
Ndvi2Gif is a Python library for multi-temporal remote sensing analysis with Google Earth Engine. It provides seasonal compositing, 40+ vegetation and environmental indices, SAR preprocessing, time series analytics, land cover classification, and hydroperiod analysis — all server-side, without downloading raw data.
Built on top of Google Earth Engine and geemap. Adapted and extended through its use in the eLTER and SUMHAL projects.
https://digdgeo.github.io/Ndvi2Gif/
New module: HydroperiodAnalyzer — GEE-native flood duration analysis per pixel using midpoint temporal weighting, entirely server-side. Supports multi-year cycles, anomaly detection, and IRT metrics. Methodology based on phydroperiod.
Minor improvements: SCL-based cloud masking for Sentinel-2 (scl_mask=True by default), numpy 2.x support. See CHANGELOG for details.
| Module | Description |
|---|---|
NdviSeasonality |
Core engine: seasonal compositing, 40+ indices, 7 sensors, flexible ROI input |
HydroperiodAnalyzer |
Wetland flood duration analysis (days/year) with multi-year anomaly detection |
TimeSeriesAnalyzer |
Trend detection (Mann-Kendall, Sen's slope), phenology metrics, dashboards |
S1ARDProcessor |
Sentinel-1 SAR preprocessing: terrain correction, speckle filtering |
LandCoverClassifier |
Supervised (RF, SVM, CART) and unsupervised (K-means, LDA) classification |
pip install ndvi2gifconda install -c conda-forge ndvi2gifimport ee
from ndvi2gif import NdviSeasonality
ee.Authenticate()
ee.Initialize()
# Monthly NDVI composites from Sentinel-2 (2018–2024)
ndvi = NdviSeasonality(
roi=your_roi, sat='S2', periods=12,
start_year=2018, end_year=2024,
key='percentile', percentile=85, index='ndvi'
)
ndvi.get_gif(name='ndvi_evolution.gif')Yes, it makes nice GIFs — but it's much more than that.

- Compute pixel-wise statistics over any region and time span — seasonal medians, percentiles, multi-year aggregations
- Monitor 40+ indices across Sentinel-1/2/3, Landsat (4–9), MODIS, ERA5-Land, and CHIRPS
- Analyse wetland hydroperiod and multi-year flood anomalies with
HydroperiodAnalyzer - Detect trends and phenology (SOS, EOS, POS, Length of Season) with
TimeSeriesAnalyzer - Classify land cover with multi-temporal feature stacks and Random Forest, SVM, or K-means
- Preprocess Sentinel-1 SAR with terrain correction and speckle filtering
- Export to GeoTIFF, Google Drive, or Earth Engine Assets
- Use any ROI: shapefile, GeoJSON, drawn geometry, eLTER DEIMS ID, Sentinel-2 tile, or Landsat path/row
Sentinel-1 (SAR) · Sentinel-2 SR · Sentinel-3 OLCI · Landsat 4–9 SR · MODIS MOD09A1 · ERA5-Land · CHIRPS
Bug reports and feature requests: GitHub Issues
Pull requests are welcome. See CONTRIBUTING.md for guidelines — it includes step-by-step instructions for adding new indices and datasets.
@software{garcia_diaz_ndvi2gif_2020,
author = {García Díaz, Diego},
title = {ndvi2gif: Multi-Seasonal Remote Sensing Analysis Suite},
url = {https://github.com/Digdgeo/Ndvi2Gif},
version = {1.2.0},
year = {2020}
}Special thanks to Qiusheng Wu for his invaluable work in developing and promoting open-source geospatial software, to the Google Earth Engine team, and to the broader open-source geospatial community.
MIT — see LICENSE.txt