skillfed

antimeridian

Correct GeoJSON geometries that cross the 180th meridian

antimeridian v0.4.8 154.9K downloads/30d#10,837 on PyPI110
Permissive license Apache-2.0 Active released

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 antimeridian

uv

uv add antimeridian

poetry

poetry add antimeridian

Installing 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

Development Status :: 5 - Production/StableProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14

Tags

antimeridian geometry fixgeojson 180 meridianshapely cross meridianfix dateline crossinggeospatial geometry correctioninternational date line geojsonpolygon antimeridian split
geospatialgeojsongeometry-processing

More Scientific/Engineering packages