Skip to main content

Fix GeoJSON geometries that cross the antimeridian

Project description


CI Status Read the Docs PyPI

GitHub Contributor Covenant

Demonstration image

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

Can fix:


pip install antimeridian


import antimeridian

fixed = antimeridian.fix_geojson(geojson)

We also have some utilities to create bounding boxes and centroids from antimeridian-crossing polygons and multipolygons. See the documentation for a complete API reference.

Command line interface

Use the cli optional dependency to install the antimeridian CLI:

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


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

git clone
cd antimeridian
pip install -e '.[dev,docs]'

We use pytest for tests:


We use Sphinx for docs:

make -C docs html


Github issues and pull requests, please and thank you!



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.6.tar.gz (16.7 kB view hashes)

Uploaded Source

Built Distribution

antimeridian-0.3.6-py3-none-any.whl (14.2 kB view hashes)

Uploaded Python 3

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