antimeridian-0.2.3
توضیحات
Fix GeoJSON geometries that cross the antimeridian
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | antimeridian-0.2.3 |
| نام | antimeridian |
| نسخه کتابخانه | 0.2.3 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | - |
| ایمیل نویسنده | Pete Gadomski <pete.gadomski@gmail.com> |
| آدرس صفحه اصلی | - |
| آدرس اینترنتی | https://pypi.org/project/antimeridian/ |
| مجوز | Apache-2.0 |
# antimeridian
[](https://github.com/gadomski/antimeridian/actions/workflows/ci.yaml)
[](https://antimeridian.readthedocs.io/en/latest/)
[](https://pypi.org/project/antimeridian/)
[](https://github.com/gadomski/antimeridian/blob/main/LICENSE)
[](https://github.com/gadomski/antimeridian/blob/main/CODE_OF_CONDUCT)
Fix polygons that cross the antimeridian.
See [the documentation](https://antimeridian.readthedocs.io) for information about the underlying algorithm.
Depends on [shapely](https://shapely.readthedocs.io).
Can fix:
- Shapely [`Polygon`](https://shapely.readthedocs.io/en/stable/reference/shapely.Polygon.html#shapely.Polygon) and [`MultiPolygon`](https://shapely.readthedocs.io/en/stable/reference/shapely.MultiPolygon.html#shapely.MultiPolygon) 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
pip install antimeridian
```
Then:
```python
import antimeridian
fixed = antimeridian.fix_geojson(geojson)
```
### Command line interface
Use the `cli` optional dependency to install the `antimeridian` CLI:
```shell
pip install 'antimeridian[cli]'
antimeridian fix input.json > output.json
```
## Developing
Clone and install in editable mode with the development optional dependencies:
```shell
git clone https://github.com/gadomski/antimeridian
cd antimeridian
pip install -e '.[dev,docs]'
```
We use [pytest](https://docs.pytest.org) for tests:
```shell
pytest
```
We use [Sphinx](https://www.sphinx-doc.org) for docs:
```shell
make -C docs html
```
## Contributing
Github [issues](https://github.com/gadomski/antimeridian/issues) and [pull requests](https://github.com/gadomski/antimeridian/pulls), please and thank you!
## License
[Apache-2.0](https://github.com/gadomski/antimeridian/blob/main/LICENSE)
نیازمندی
| مقدار | نام |
|---|---|
| >=1.8 | shapely |
| ~=8.1 | click |
| ~=23.3 | black |
| ~=1.2 | mypy |
| ~=3.2 | pre-commit |
| ~=7.3 | pytest |
| ~=1.3 | pytest-console-scripts |
| ==0.0.262 | ruff |
| ~=0.21 | cartopy |
| ~=6.22 | ipykernel |
| ~=1.14 | jupytext |
| ~=0.9 | nbsphinx |
| ~=0.13 | pydata-sphinx-theme |
| ~=1.10 | scipy |
| ~=6.1 | sphinx |
| ~=4.4 | sphinx-click |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.8 | Python |
نحوه نصب
نصب پکیج whl antimeridian-0.2.3:
pip install antimeridian-0.2.3.whl
نصب پکیج tar.gz antimeridian-0.2.3:
pip install antimeridian-0.2.3.tar.gz