A CLI tool to render GeoJSON data using Jinja2 templates.
Project description
This project is a GeoJSON template renderer that processes GeoJSON files and applies Jinja2 templates to generate customized output. It supports:
Processing single or multiple GeoJSON files
Grouping features dynamically
Custom Jinja2 filters for feature property updates
Command-line interface (CLI) support
Installation
Prerequisites
Python 3.x
pip package manager
Install Dependencies
To install production dependencies:
make install
To install development dependencies (for testing and linting):
make install-dev
Usage
Running the Script:
python main.py <input_path> <template_path> --output <output_file>
Arguments:
input_path: Path to a GeoJSON file or a directory containing multiple GeoJSON files:
template_path: Path to the Jinja2 template file.
–output <output_file> (optional): Path to save the rendered output. If omitted, output is printed to stdout.
Example Command::
python main.py geojson_data/ templates/output.jinja --output result.geojson
Development
Running Tests:
make test
Running Tests with Coverage:
make test-coverage
Linting Code:
make lint
License
This project is licensed under the MIT License. Contact the author https://github.com/krvss for more information.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file geojson_composer-0.1.3-py3-none-any.whl.
File metadata
- Download URL: geojson_composer-0.1.3-py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
994146bc3172b4741cad5a310210a218402ed53a17448617bc0f8c3319433488
|
|
| MD5 |
e97bd10addc3088b35e3407cb8e1ec4f
|
|
| BLAKE2b-256 |
291cbfd9decb4ed78bbff6804e7c63cead99fb38b54e8ec23469dc3aacfb53dd
|