A Python library that fixes GeoJSON geometries crossing the 180th meridian (antimeridian) by splitting them into valid shapes.
antimeridian is a Python library that corrects GeoJSON geometries crossing the 180th meridian (antimeridian). It solves a common problem in geospatial data where shapes that span the antimeridian become invalid and cause rendering issues in mapping systems, by algorithmically splitting them into valid, standards-compliant geometries.
Geospatial developers, data engineers, and GIS professionals working with GeoJSON data that spans international date lines or global extents, particularly those using Python-based mapping or analysis tools.
Developers choose antimeridian for its focused, robust solution to a specific geospatial data integrity issue, its support for multiple geometry formats (Shapely, GeoJSON), and its utility functions for bounding boxes and centroids, all backed by a documented algorithm and cross-language ports.
Correct GeoJSON geometries that cross the 180th meridian
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Supports Shapely objects, GeoJSON dictionaries, and any object with __geo_interface__, making it adaptable to diverse geospatial workflows without format lock-in.
The fix_geojson function mutates input dictionaries by default for performance, with copy options to preserve originals, optimizing memory usage in batch processing.
Includes specialized utilities for bounding boxes and centroids of antimeridian-crossing shapes, aiding in post-correction analysis and visualization.
Core algorithm has been ported to TypeScript and Go, demonstrating reliability and enabling integration into non-Python tech stacks for broader adoption.
Relies on shapely and numpy, which are large packages that can bloat projects or complicate deployments in lightweight environments.
Only handles polygons, multipolygons, linestrings, and multilinestrings; points or other geometry types that cross the antimeridian are not supported, as noted in the documentation.
In-place mutation of GeoJSON dictionaries can lead to accidental data loss if users forget to copy inputs, requiring extra caution in error-prone code.