Skip to main content

Polygon Orthogonalizer

Pip implementation for polygons of orthogonalize-polygon which is an improved implementation of JOSM Orthogonalize function (JOSM Q Function). Credits to all the respective involved authors

Installation

You can install OSM Conflator using pip:

pip install orthogonalizer

Usage

Here's an example of how to use Polygon orthogonalizer in your Python code:

from orthogonalizer import othogonalize_poly

geojson_str = '{"type": "FeatureCollection", "features": ... }'

orthogonalized_poly = othogonalize_poly(geojson_str)

print(orthogonalized_poly)

Options :

maxAngleChange (int, optional): angle (0,45> degrees. Sets the maximum angle deviation from the cardinal direction for the segment to be still considered to continue in the same direction as the previous segment. Defaults to 15.

skewTolerance (int, optional): angle <0,45> degrees. Sets skew tolerance for segments that are at 45˚±Tolerance angle from the overal rectangular shape of the polygon. Usefull when preserving e.g. bay windows on a house. Defaults to 15.

Example

Input ---> Output image

Contributing

Contributions are welcome! If you find any issues or have suggestions for improvements, please feel free to open an issue or submit a pull request. When contributing to this project, please follow the Contributing Guidelines.

License

This project is licensed under the GNU General Public License v3.0 License. See the LICENSE file for more information.

Metadata

Release files for orthogonalizer 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for orthogonalizer 0.0.4
File Size Uploaded Provenance Actions
orthogonalizer-0.0.4.tar.gz 20.3 kB Without provenance Details for orthogonalizer-0.0.4.tar.gz

Release files / orthogonalizer-0.0.4.tar.gz

Download URL orthogonalizer-0.0.4.tar.gz
Size 20.3 kB
Tags Source
SHA-256 checksum
How to use checksums
e62e15aad1b7c13aa431224996e1009101e1dc90ce9235d5f1bd6dae3f96fb8d
BLAKE2b-256 checksum
How to use checksums
75cc34bf01ca76b0d94c98e2d7a31cf985ec5544c1881265bb60f100e1cfbb24
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Security for orthogonalizer 0.0.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.4 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page