Skip to main content

Fix GeoJSON geometries that cross the antimeridian

Project description

antimeridian

CI Status Read the Docs PyPI

GitHub Contributor Covenant

Fix polygons that cross the antimeridian. See the documentation for information about the underlying algorithm. Depends on shapely.

Can fix:

Usage

pip install antimeridian

Then:

import antimeridian

fixed = antimeridian.fix_geojson(geojson)

Command line interface

Use the cli optional dependency to install the antimeridian CLI:

pip install 'antimeridian[cli]'
antimeridian fix input.json > output.json

Developing

Clone and install in editable mode with the development optional dependencies:

git clone https://github.com/gadomski/antimeridian
cd antimeridian
pip install -e '.[dev,docs]'

We use pytest for tests:

pytest

We use Sphinx for docs:

make -C docs html

Contributing

Github issues and pull requests, please and thank you!

License

Apache-2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

antimeridian-0.3.0.tar.gz (14.6 kB view details)

Uploaded Source

Built Distribution

antimeridian-0.3.0-py3-none-any.whl (12.7 kB view details)

Uploaded Python 3

File details

Details for the file antimeridian-0.3.0.tar.gz.

File metadata

  • Download URL: antimeridian-0.3.0.tar.gz
  • Upload date:
  • Size: 14.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.4

File hashes

Hashes for antimeridian-0.3.0.tar.gz
Algorithm Hash digest
SHA256 a12551b6c07fe129ecd453b5524452ccc73d7df4a60d92a1d8fea184c387d140
MD5 b2c5e1411309aca0d371071238732db3
BLAKE2b-256 b79a3de73a74f7b5af14c00781535345e5d25a5624af70b6ebf59ecfbd75636a

See more details on using hashes here.

File details

Details for the file antimeridian-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: antimeridian-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 12.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.4

File hashes

Hashes for antimeridian-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9d70d00f65f71cd8c437756a328269c90e08bbf52cf590d04a17890c7e16b668
MD5 3abd251e837bbbf5da6b9698902c6c0b
BLAKE2b-256 1be35ea5f631c47cf20ec15fccfe1b6f182be1991f54a3b026bfdd2df686a502

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page