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.3.tar.gz
(12.4 kB
view hashes)
Built Distribution
Close
Hashes for antimeridian-0.2.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 19f2b13cc78ba5b46e71ad9864ed3de8ccf251e07eeaea93a8ace8e7d87fe65e |
|
MD5 | a4997dbdc94456a1f4413195bcb6ec73 |
|
BLAKE2b-256 | 5bdb902a174ede5779f1e9c4fb8caf89f42ff529f481e5bab392e3fc73c52c19 |