antimeridian
Correct GeoJSON geometries that cross the 180th meridian
What it is and what it does
Antimeridian is a geometry correction library for handling shapes that cross the 180th meridian (antimeridian), a common problem in global geospatial data. It works with Shapely geometry objects and GeoJSON dictionaries, transforming coordinates so that geometries that span the date line are properly represented in standard geographic systems. The library depends on numpy and shapely for its core operations.
The package is useful when working with global maps or datasets that include features near the poles or spanning the international date line. It provides not only the core fix function but also utilities for computing bounding boxes and centroids from antimeridian-crossing polygons. An optional CLI is available for batch processing GeoJSON files from the command line.
Use it for:
- Correct GeoJSON features from global mapping APIs that include territories crossing the date line.
- Prepare Shapely geometries for rendering on web maps without distortion artifacts at the antimeridian.
- Batch-process GeoJSON files to fix meridian-crossing boundaries before loading into a spatial database.
- Compute accurate bounding boxes and centroids for polygons that span the 180th meridian.
- Normalize geographic data from sources that represent date-line-crossing regions inconsistently.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Fixes Shapely geometries and GeoJSON features that cross the antimeridian (180th meridian), handling Polygons, MultiPolygons, LineStrings, and MultiLineStrings.
Yes. The package solves a specific but real problem in geospatial work with minimal dependencies and active maintenance. It is Production/Stable, has no known vulnerabilities, and is permissively licensed. Install it if you work with global geographic data or need to handle geometries near the antimeridian.
Install
antimeridian on PyPI
pip
pip install antimeridianuv
uv add antimeridianpoetry
poetry add antimeridianInstalling antimeridian
Before you install
Low friction: pure Python wheel with only numpy and shapely as runtime dependencies. Actively maintained with recent releases; last commit 2026-08-10 and marked Production/Stable.
License in practice
Apache-2.0 is permissive; you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
Quickstart
pip install antimeridian
import antimeridian
fixed = antimeridian.fix_geojson(geojson)
Requires Python 3.10 or later. Note: fix_geojson mutates the input dictionary in-place; pass a deepcopy if you need to preserve the original.
Verify before relying
- Performance characteristics with large or complex geometries (number of vertices, coordinate density).
- Behavior with edge cases like geometries exactly on the antimeridian or with multiple crossings.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — numpy, shapely |
| Maintenance | actively maintained — 53 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 154,936/month — #10,837 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: antimeridian-0.4.8-py3-none-any.whl
Keywords: antimeridian, geojson, shapely
Tags
More Scientific/Engineering packages
NumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
pandaspandas provides fast, flexible data structures…
permissive · top 100 on PyPI
scipyscipy provides numerical algorithms for…
permissive · top 100 on PyPI
scikit-learnscikit-learn provides a comprehensive Python…
permissive · top 1,000 on PyPI
dilldill extends Python's pickle module to…
permissive · top 1,000 on PyPI
multiprocessMultiprocess is an enhanced fork of Python's…
permissive · top 1,000 on PyPI
shapelyShapely provides Python tools for creating,…
permissive · top 1,000 on PyPI
geopandasGeoPandas extends pandas DataFrames to handle…
permissive · top 1,000 on PyPI
osm2geojsonConverts OpenStreetMap and Overpass API data…
permissive · top 15,000 on PyPI
descartesConverts geometric objects and GeoJSON-like…
permissive · top 15,000 on PyPI
pydantic-geojsonProvides Pydantic-based type-safe validation…
permissive · top 15,000 on PyPI
plpygisConverts geometries between WKB/EWKB, WKT/EWKT,…
copyleft · top 15,000 on PyPI
geometConverts between GeoJSON, WKT/WKB, Extended…
permissive · top 5,000 on PyPI
reprojReproject shapely geometries between coordinate…
permissive · top 15,000 on PyPI
quadrilateral-fitterFits the smallest-area quadrilateral that…
permissive · top 15,000 on PyPI
geojson-pydanticProvides Pydantic models that validate and…
permissive · top 5,000 on PyPI