Fix GeoJSON geometries that cross the antimeridian
Project description
antimeridian
Fix polygons that cross the antimeridian. See the documentation for information about the underlying algorithm. Depends on shapely.
Can fix:
- Shapely
Polygon
andMultiPolygon
objects - GeoJSON Polygons, MultiPolygons, Features and FeatureCollections, as dictionaries
- Anything that has a
__geo_interface__
Usage
pip install antimeridian
Then:
import antimeridian
fixed = antimeridian.fix_geojson(geojson)
Command line interface
Use the cli
optional dependency to install the antimeridian
CLI:
pip install 'antimeridian[cli]'
antimeridian fix input.json > output.json
Developing
Clone and install in editable mode with the development optional dependencies:
git clone https://github.com/gadomski/antimeridian
cd antimeridian
pip install -e '.[dev,docs]'
We use pytest for tests:
pytest
We use Sphinx for docs:
make -C docs html
Contributing
Github issues and pull requests, please and thank you!
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
antimeridian-0.2.5.tar.gz
(13.2 kB
view hashes)
Built Distribution
Close
Hashes for antimeridian-0.2.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a685764a37e9196e947d8bc0e116f93782fe8a53deb4015a2e5a19c9a83b7f49 |
|
MD5 | 191618095fdddba15ee7edf898bef9f9 |
|
BLAKE2b-256 | f31567954e235c7fb6643fbf7e47e4ed4310a2b86f20643d8c5a4c2fe4791cb0 |