Name | antimeridian JSON |
Version |
0.4.3
JSON |
| download |
home_page | None |
Summary | Correct GeoJSON geometries that cross the 180th meridian |
upload_time | 2025-07-25 10:40:40 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.10 |
license | Apache-2.0 |
keywords |
antimeridian
geojson
shapely
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# antimeridian
[](https://github.com/gadomski/antimeridian/actions/workflows/ci.yaml)
[](https://www.gadom.ski/antimeridian/)
[](https://pypi.org/project/antimeridian/)
[](https://anaconda.org/conda-forge/antimeridian)
[](https://github.com/gadomski/antimeridian/blob/main/LICENSE)
[](https://github.com/gadomski/antimeridian/blob/main/CODE_OF_CONDUCT)
[](https://joss.theoj.org/papers/2a6c626b3774c8310e46c05fdf8d10de)
[](https://doi.org/10.5281/zenodo.14335984)

Fix shapes that cross the antimeridian.
See [the documentation](https://antimeridian.readthedocs.io) for information about the underlying algorithm.
Depends on [shapely](https://shapely.readthedocs.io) and [numpy](https://numpy.org/).
Can fix:
- Shapely [`Polygon`](https://shapely.readthedocs.io/en/stable/reference/shapely.Polygon.html#shapely.Polygon), [`MultiPolygon`](https://shapely.readthedocs.io/en/stable/reference/shapely.MultiPolygon.html#shapely.MultiPolygon), [`LineString`](https://shapely.readthedocs.io/en/stable/reference/shapely.LineString.html#shapely.LineString), and [`MultiLineString`](https://shapely.readthedocs.io/en/stable/reference/shapely.MultiLineString.html#shapely.MultiLineString) objects
- GeoJSON [Polygons](https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.6), [MultiPolygons](https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.7), [Features](https://datatracker.ietf.org/doc/html/rfc7946#section-3.2) and [FeatureCollections](https://datatracker.ietf.org/doc/html/rfc7946#section-3.3), as dictionaries
- Anything that has a [`__geo_interface__`](https://gist.github.com/sgillies/2217756)
## Usage
```shell
python -m pip install antimeridian
```
Then:
```python
import antimeridian
fixed = antimeridian.fix_geojson(geojson)
```
We also have some utilities to create [bounding boxes](https://antimeridian.readthedocs.io/en/latest/api.html#antimeridian.bbox) and [centroids](https://antimeridian.readthedocs.io/en/latest/api.html#antimeridian.centroid) from antimeridian-crossing polygons and multipolygons.
See [the documentation](https://www.gadom.ski/antimeridian/) for a complete API reference.
### Command line interface
Use the `cli` optional dependency to install the `antimeridian` CLI:
```shell
python -m pip install 'antimeridian[cli]'
antimeridian fix input.json > output.json
```
## Developing
Get [uv](https://docs.astral.sh/uv/getting-started/installation/).
Then:
```shell
git clone https://github.com/gadomski/antimeridian
cd antimeridian
uv sync
```
We use [pytest](https://docs.pytest.org) for tests:
```shell
uv run pytest
```
To build and serve the docs locally:
```shell
uv run mkdocs serve
```
## Contributing
See [CONTRIBUTING.md](./CONTRIBUTING.md).
## License
[Apache-2.0](https://github.com/gadomski/antimeridian/blob/main/LICENSE)
Raw data
{
"_id": null,
"home_page": null,
"name": "antimeridian",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "antimeridian, geojson, shapely",
"author": null,
"author_email": "Pete Gadomski <pete.gadomski@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/18/d9/40cda441a5483ae6b60ee8eec224b7933639a7a89a30f0e0d702eb16d8f6/antimeridian-0.4.3.tar.gz",
"platform": null,
"description": "# antimeridian\n\n[](https://github.com/gadomski/antimeridian/actions/workflows/ci.yaml)\n[](https://www.gadom.ski/antimeridian/)\n[](https://pypi.org/project/antimeridian/)\n[](https://anaconda.org/conda-forge/antimeridian)\n[](https://github.com/gadomski/antimeridian/blob/main/LICENSE)\n[](https://github.com/gadomski/antimeridian/blob/main/CODE_OF_CONDUCT)\n\n[](https://joss.theoj.org/papers/2a6c626b3774c8310e46c05fdf8d10de)\n[](https://doi.org/10.5281/zenodo.14335984)\n\n\n\nFix shapes that cross the antimeridian.\nSee [the documentation](https://antimeridian.readthedocs.io) for information about the underlying algorithm.\nDepends on [shapely](https://shapely.readthedocs.io) and [numpy](https://numpy.org/).\n\nCan fix:\n\n- Shapely [`Polygon`](https://shapely.readthedocs.io/en/stable/reference/shapely.Polygon.html#shapely.Polygon), [`MultiPolygon`](https://shapely.readthedocs.io/en/stable/reference/shapely.MultiPolygon.html#shapely.MultiPolygon), [`LineString`](https://shapely.readthedocs.io/en/stable/reference/shapely.LineString.html#shapely.LineString), and [`MultiLineString`](https://shapely.readthedocs.io/en/stable/reference/shapely.MultiLineString.html#shapely.MultiLineString) objects\n- GeoJSON [Polygons](https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.6), [MultiPolygons](https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.7), [Features](https://datatracker.ietf.org/doc/html/rfc7946#section-3.2) and [FeatureCollections](https://datatracker.ietf.org/doc/html/rfc7946#section-3.3), as dictionaries\n- Anything that has a [`__geo_interface__`](https://gist.github.com/sgillies/2217756)\n\n## Usage\n\n```shell\npython -m pip install antimeridian\n```\n\nThen:\n\n```python\nimport antimeridian\n\nfixed = antimeridian.fix_geojson(geojson)\n```\n\nWe also have some utilities to create [bounding boxes](https://antimeridian.readthedocs.io/en/latest/api.html#antimeridian.bbox) and [centroids](https://antimeridian.readthedocs.io/en/latest/api.html#antimeridian.centroid) from antimeridian-crossing polygons and multipolygons.\nSee [the documentation](https://www.gadom.ski/antimeridian/) for a complete API reference.\n\n### Command line interface\n\nUse the `cli` optional dependency to install the `antimeridian` CLI:\n\n```shell\npython -m pip install 'antimeridian[cli]'\nantimeridian fix input.json > output.json\n```\n\n## Developing\n\nGet [uv](https://docs.astral.sh/uv/getting-started/installation/).\nThen:\n\n```shell\ngit clone https://github.com/gadomski/antimeridian\ncd antimeridian\nuv sync\n```\n\nWe use [pytest](https://docs.pytest.org) for tests:\n\n```shell\nuv run pytest\n```\n\nTo build and serve the docs locally:\n\n```shell\nuv run mkdocs serve\n```\n\n## Contributing\n\nSee [CONTRIBUTING.md](./CONTRIBUTING.md).\n\n## License\n\n[Apache-2.0](https://github.com/gadomski/antimeridian/blob/main/LICENSE)\n",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "Correct GeoJSON geometries that cross the 180th meridian",
"version": "0.4.3",
"project_urls": {
"Changelog": "https://github.com/gadomski/antimeridian/blob/main/CHANGELOG.md",
"Documentation": "https://www.gadom.ski/antimeridian",
"Github": "https://github.com/gadomski/antimeridian",
"Issues": "https://github.com/gadomski/antimeridian/issues"
},
"split_keywords": [
"antimeridian",
" geojson",
" shapely"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "d7fedcaa1c91a561c582afe815bdf01e482fb892c901867a36020cbab54c71d1",
"md5": "3584779a7859dabc3ff7fab9978d11ad",
"sha256": "296fd75f7c5785c2112eb247ee847458e6940ee9ff9f099d85cf3bc2a61c629d"
},
"downloads": -1,
"filename": "antimeridian-0.4.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "3584779a7859dabc3ff7fab9978d11ad",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 14951,
"upload_time": "2025-07-25T10:40:39",
"upload_time_iso_8601": "2025-07-25T10:40:39.001052Z",
"url": "https://files.pythonhosted.org/packages/d7/fe/dcaa1c91a561c582afe815bdf01e482fb892c901867a36020cbab54c71d1/antimeridian-0.4.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "18d940cda441a5483ae6b60ee8eec224b7933639a7a89a30f0e0d702eb16d8f6",
"md5": "cfeb18a9972057be692105d6a205fcb1",
"sha256": "3797f916e44b7b78c45933a2441bb163aff41ccd3c79483de71a1466a3f6f049"
},
"downloads": -1,
"filename": "antimeridian-0.4.3.tar.gz",
"has_sig": false,
"md5_digest": "cfeb18a9972057be692105d6a205fcb1",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 12590276,
"upload_time": "2025-07-25T10:40:40",
"upload_time_iso_8601": "2025-07-25T10:40:40.890104Z",
"url": "https://files.pythonhosted.org/packages/18/d9/40cda441a5483ae6b60ee8eec224b7933639a7a89a30f0e0d702eb16d8f6/antimeridian-0.4.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-25 10:40:40",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "gadomski",
"github_project": "antimeridian",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "antimeridian"
}