Command line interface
The antimeridian CLI (command line interface) takes a GeoJSON file path as its input, and outputs a fixed GeoJSON dictionary to standard output.
Installation
Install with pip:
python -m pip install 'antimeridian[cli]'
Usage
cli
Usage:
cli [OPTIONS] COMMAND [ARGS]...
Options:
--help Show this message and exit.
bbox
Calculates the antimeridian-spanning bbox for the input geometry.
Usage:
cli bbox [OPTIONS] [INFILE]
Options:
-f, --force-over-antimeridian BOOLEAN
Force the bbox to be antimeridian-spanning
--help Show this message and exit.
fix
Fixes any antimeridian problems a GeoJSON file
Writes the fixed GeoJSON to standard output. If the filename is -
the
input GeoJSON is read from standard input.
Usage:
cli fix [OPTIONS] [INFILE]
Options:
--force-north-pole Force the fixed polygon to enclose the north
pole
--force-south-pole Force the fixed polygon to enclose the south
pole
--fix-winding / --no-fix-winding
Automatically fix clockwise polygons to be
the correct counterclockwise winding order
[default: fix-winding]
--great-circle / --no-great-circle
Compute meridian crossings on the sphere
rather than using 2D geometry [default:
great-circle]
--reverse Reverse the coordinates before fixing
--help Show this message and exit.
segment
Segments the exterior coordinates of a GeoJSON file
Prints the resulting MultiLineString to standard output. Useful mostly for
debugging problems with fix
.
Usage:
cli segment [OPTIONS] [INFILE]
Options:
-i, --index INTEGER Return the single LineString at this index
--great-circle / --no-great-circle
Compute meridian crossings on the sphere
rather than using 2D geometry [default:
great-circle]
--help Show this message and exit.