Zonal statistics and NDVI feature extraction for remote sensing ML pipelines
Project description
GeoFeatures
Lightweight Python library for extracting zonal statistics and vegetation indices (NDVI) from satellite imagery for remote sensing ML pipelines.
Why
Computing per-polygon raster statistics (e.g. mean NDVI per farm parcel or administrative region) is a repetitive step in almost every remote sensing / geospatial ML workflow. GeoFeatures wraps this into a clean, tested API.
Install
pip install geofeatures
Quick example
from geofeatures.core import ndvi_zonal_stats
import geopandas as gpd
polygons = gpd.read_file("parcels.geojson")
result = ndvi_zonal_stats(
nir_band=nir,
red_band=red,
vector_gdf=polygons,
raster_template_path="ndvi.tif"
)
print(result[["name", "mean", "std"]])
Validated on real data
Tested end-to-end on Sentinel-2 L2A imagery (via Microsoft Planetary Computer) over Ogun State, Nigeria — mean NDVI of 0.29 across ~4M pixels, consistent with mixed agricultural/urban land cover.
API
compute_ndvi(nir_band, red_band)— compute NDVI from raw bandsextract_zonal_features(raster_path, vector_gdf, stats)— zonal statistics per polygonndvi_zonal_stats(nir_band, red_band, vector_gdf, raster_template_path)— convenience wrapper combining both
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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 geofeatures-0.1.0.tar.gz.
File metadata
- Download URL: geofeatures-0.1.0.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7bb688f529ef2184bb532098f9ff5d2241e6a8fe228a25e0bc4560c9131b1040
|
|
| MD5 |
530bee3f4253b5d2af12229e5a43ea3f
|
|
| BLAKE2b-256 |
a6894571ad596a7f0c43f349bf99556046deee74e517ba18f4db389d254e1404
|
File details
Details for the file geofeatures-0.1.0-py3-none-any.whl.
File metadata
- Download URL: geofeatures-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
170371abe2d17beba2aacd9c0c5ad44f4dfcb5d4788d66e9cdccb30aa452fda4
|
|
| MD5 |
81384bce9f74a463b0d637695076c628
|
|
| BLAKE2b-256 |
39f8ce541306040bc1d60d3d05f0ea676ae19ba7537dc6197f522639d57f5aca
|