cligj provides a collection of reusable Click parameter and option decorators specifically designed for building command-line interfaces that interact with GeoJSON data. It simplifies handling GeoJSON input/output, feature processing, and related geospatial concerns within Click applications. The current version is 0.7.2, and it maintains a stable release cadence typical for a mature utility library.
pip install cligjVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to use `cligj.features_in_info` to create a Click command that reads GeoJSON features from standard input, adds a new property indicating the feature's index in the input stream, and writes the modified features as a GeoJSON sequence to standard output. It's a common pattern for processing streamable GeoJSON data.
Replace `cligj.old_precision_opt()` with `cligj.precision_opt()` in your Click commands to use the clearer and officially supported option.
Use `features_in_info` when your command processes GeoJSON features one by one. Use `io_in_info` when your command expects a single GeoJSON object or needs direct control over the input/output streams for tasks like validation or transformation of the entire GeoJSON structure.
Develop new applications and maintain existing ones on Python 3 (preferably 3.8+). If you must interact with legacy Python 2 code, ensure thorough testing and be prepared for potential maintenance challenges.