https://github.com/pjhartzell/raster-footprint
Create GeoJSON geometries that bound valid raster data
https://github.com/pjhartzell/raster-footprint
footprint geojson geospatial python raster
Last synced: 10 days ago
JSON representation
Create GeoJSON geometries that bound valid raster data
- Host: GitHub
- URL: https://github.com/pjhartzell/raster-footprint
- Owner: pjhartzell
- License: apache-2.0
- Created: 2023-05-06T00:59:02.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-09-26T11:28:03.000Z (over 1 year ago)
- Last Synced: 2025-04-12T01:39:40.106Z (12 days ago)
- Topics: footprint, geojson, geospatial, python, raster
- Language: Python
- Homepage: https://raster-footprint.readthedocs.io
- Size: 15.3 MB
- Stars: 9
- Watchers: 3
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# raster-footprint
[](https://github.com/pjhartzell/raster-footprint/actions/workflows/ci.yaml)
[](https://raster-footprint.readthedocs.io/en/latest/)
[](https://pypi.org/project/raster-footprint/)[](https://github.com/pjhartzell/raster-footprint/blob/main/LICENSE)
Create GeoJSON geometries that bound valid raster data. Depends on [rasterio](https://rasterio.readthedocs.io/en/stable/) and [shapely](https://shapely.readthedocs.io/en/stable/manual.html).
## Usage
```shell
pip install raster-footprint
```Create or manipulate GeoJSON with the CLI:
```shell
raster-footprint --help
usage: raster-footprint [-h] {create,densify,reproject,simplify} ...options:
-h, --help show this help message and exitcommands:
{create,densify,reproject,simplify}
create Create a raster footprint
densify Densify a Polygon or MultiPolygon
reproject Reproject a Polygon or MultiPolygon
simplify Simplify a Polygon or MultiPolygon
```Import `raster_footprint` functions into your Python script:
```Python
from raster_footprint import footprint_from_hreffootprint = footprint_from_href(
"my_raster.tif",
densify_distance=100,
simplify_tolerance=0.001,
holes=False
)
```See the [API documentation](https://raster-footprint.readthedocs.io/) for available functions and options.
## Developing
Clone and install in editable mode with the development optional dependencies:
```shell
git clone https://github.com/pjhartzell/raster-footprint
cd raster-footprint
pip install -e ".[dev,docs]"
```We use [pytest](https://docs.pytest.org/) for tests:
```shell
pytest
```We use [Sphinx](https://www.sphinx-doc.org/) for docs:
```shell
make -C docs html
```## Contributing
Github [issues](https://github.com/pjhartzell/raster-footprint/issues) and [pull requests](https://github.com/pjhartzell/raster-footprint/pulls).
## License
[Apache-2.0](https://github.com/pjhartzell/raster-footprint/blob/main/LICENSE)