Name | antimeridian JSON |
Version |
0.4.0
JSON |
| download |
home_page | None |
Summary | Correct GeoJSON geometries that cross the 180th meridian |
upload_time | 2024-12-18 00:36:34 |
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
[![CI Status](https://img.shields.io/github/actions/workflow/status/gadomski/antimeridian/ci.yaml?style=for-the-badge&label=CI)](https://github.com/gadomski/antimeridian/actions/workflows/ci.yaml)
[![Docs](https://img.shields.io/github/actions/workflow/status/gadomski/antimeridian/docs.yaml?style=for-the-badge&label=Docs)](https://www.gadom.ski/antimeridian/)
[![PyPI](https://img.shields.io/pypi/v/antimeridian?style=for-the-badge)](https://pypi.org/project/antimeridian/)
[![Conda Downloads](https://img.shields.io/conda/d/conda-forge/antimeridian?style=for-the-badge)](https://anaconda.org/conda-forge/antimeridian)
[![GitHub](https://img.shields.io/github/license/gadomski/antimeridian?style=for-the-badge)](https://github.com/gadomski/antimeridian/blob/main/LICENSE)
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg?style=for-the-badge)](https://github.com/gadomski/antimeridian/blob/main/CODE_OF_CONDUCT)
[![status](https://joss.theoj.org/papers/2a6c626b3774c8310e46c05fdf8d10de/status.svg)](https://joss.theoj.org/papers/2a6c626b3774c8310e46c05fdf8d10de)
[![DOI](https://zenodo.org/badge/626665725.svg)](https://doi.org/10.5281/zenodo.14335984)
![Demonstration image](./docs/img/complex-split.png)
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/6f/d3/bc0be8db2e34a89c943ff690b9112a8f255bad10c6f1a9a06a27e03d9d95/antimeridian-0.4.0.tar.gz",
"platform": null,
"description": "# antimeridian\n\n[![CI Status](https://img.shields.io/github/actions/workflow/status/gadomski/antimeridian/ci.yaml?style=for-the-badge&label=CI)](https://github.com/gadomski/antimeridian/actions/workflows/ci.yaml)\n[![Docs](https://img.shields.io/github/actions/workflow/status/gadomski/antimeridian/docs.yaml?style=for-the-badge&label=Docs)](https://www.gadom.ski/antimeridian/)\n[![PyPI](https://img.shields.io/pypi/v/antimeridian?style=for-the-badge)](https://pypi.org/project/antimeridian/)\n[![Conda Downloads](https://img.shields.io/conda/d/conda-forge/antimeridian?style=for-the-badge)](https://anaconda.org/conda-forge/antimeridian)\n[![GitHub](https://img.shields.io/github/license/gadomski/antimeridian?style=for-the-badge)](https://github.com/gadomski/antimeridian/blob/main/LICENSE)\n[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg?style=for-the-badge)](https://github.com/gadomski/antimeridian/blob/main/CODE_OF_CONDUCT)\n\n[![status](https://joss.theoj.org/papers/2a6c626b3774c8310e46c05fdf8d10de/status.svg)](https://joss.theoj.org/papers/2a6c626b3774c8310e46c05fdf8d10de)\n[![DOI](https://zenodo.org/badge/626665725.svg)](https://doi.org/10.5281/zenodo.14335984)\n\n![Demonstration image](./docs/img/complex-split.png)\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.0",
"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": "",
"digests": {
"blake2b_256": "34ac864b64ca8a3ff49ee2d7073935b8b5e722aa18e9dd071c7fca709484ebab",
"md5": "b99443dbb0f55238f6e95bdd25a947ab",
"sha256": "b658456d9f5d2d9dd3ca3ad6573df415991a73b73f19dfda19e1e93793456fd0"
},
"downloads": -1,
"filename": "antimeridian-0.4.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "b99443dbb0f55238f6e95bdd25a947ab",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 14849,
"upload_time": "2024-12-18T00:36:27",
"upload_time_iso_8601": "2024-12-18T00:36:27.202741Z",
"url": "https://files.pythonhosted.org/packages/34/ac/864b64ca8a3ff49ee2d7073935b8b5e722aa18e9dd071c7fca709484ebab/antimeridian-0.4.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "6fd3bc0be8db2e34a89c943ff690b9112a8f255bad10c6f1a9a06a27e03d9d95",
"md5": "0a90ac0ca0a026bdc96788c76c2dcda0",
"sha256": "f15404df8d39237b1854f2ee5eec4b77b12f86469d59b713dc7dcf9a3962d58c"
},
"downloads": -1,
"filename": "antimeridian-0.4.0.tar.gz",
"has_sig": false,
"md5_digest": "0a90ac0ca0a026bdc96788c76c2dcda0",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 12556010,
"upload_time": "2024-12-18T00:36:34",
"upload_time_iso_8601": "2024-12-18T00:36:34.324128Z",
"url": "https://files.pythonhosted.org/packages/6f/d3/bc0be8db2e34a89c943ff690b9112a8f255bad10c6f1a9a06a27e03d9d95/antimeridian-0.4.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-18 00:36:34",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "gadomski",
"github_project": "antimeridian",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "antimeridian"
}