Skip to main content

Multi-seasonal remote sensing analysis suite: composites, SAR preprocessing, time series analytics, and land cover classification with Google Earth Engine

Project description

Ndvi2Gif: Multi-Seasonal Remote Sensing Index Composites

PyPI version PyPI downloads Conda version Conda downloads Build status

NDVI2GIF Köln Richter's stained glass in Cologne Cathedral. Inspiration for this library.

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.


📚 Documentation

https://digdgeo.github.io/Ndvi2Gif/


✨ What's New in v1.3.0

New module: SpatialPhenologyAnalyzer — GEE-native, per-pixel phenology rasters (Start/Peak/End of Season and derived metrics) for the whole ROI, entirely server-side. Three methods (threshold, derivative, and harmonic Fourier regression — the Earth Engine-native replacement for double-logistic fitting), per-year or multi-year aggregate outputs, and export to local GeoTIFF or Google Drive with named bands. See CHANGELOG for details.

Previously, in v1.2.0: HydroperiodAnalyzer (GEE-native flood duration analysis), SCL-based cloud masking for Sentinel-2, and numpy 2.x support.


Modules

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
SpatialPhenologyAnalyzer Per-pixel phenology rasters (SOS/POS/EOS) via threshold, derivative or harmonic methods
S1ARDProcessor Sentinel-1 SAR preprocessing: terrain correction, speckle filtering
LandCoverClassifier Supervised (RF, SVM, CART) and unsupervised (K-means, LDA) classification

Installation

pip install ndvi2gif
conda install -c conda-forge ndvi2gif

Quick Start

import ee
from ndvi2gif import NdviSeasonality

ee.Authenticate()
ee.Initialize(project='your-project-id')

# 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.

GIF Example Crop pattern dance around Los Palacios y Villafranca (SW Spain)


What you can do with it

  • 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

Supported Sensors

Sentinel-1 (SAR) · Sentinel-2 SR · Sentinel-3 OLCI · Landsat 4–9 SR · MODIS MOD09A1 · ERA5-Land · CHIRPS


Contributing

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.


Citation

@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.3.0},
  year    = {2020}
}

Acknowledgments

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.

License

MIT — see LICENSE.txt

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

ndvi2gif-1.3.1.tar.gz (122.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ndvi2gif-1.3.1-py3-none-any.whl (106.6 kB view details)

Uploaded Python 3

File details

Details for the file ndvi2gif-1.3.1.tar.gz.

File metadata

  • Download URL: ndvi2gif-1.3.1.tar.gz
  • Upload date:
  • Size: 122.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for ndvi2gif-1.3.1.tar.gz
Algorithm Hash digest
SHA256 a9c468c3df21e0b0e3c841ed37f69d0ac46b57927deb93ae350ca2a37a5e9e85
MD5 2e14b3e59007de7315931e296219c343
BLAKE2b-256 cd9ed2b83c232feb0c63bbc15a20fe009fbc7832e27bf1d53f827cb06c820286

See more details on using hashes here.

File details

Details for the file ndvi2gif-1.3.1-py3-none-any.whl.

File metadata

  • Download URL: ndvi2gif-1.3.1-py3-none-any.whl
  • Upload date:
  • Size: 106.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for ndvi2gif-1.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2ac4e0fbff1eb987643f9b672fbd29f65d157493b7a60af27a29ac457812d71f
MD5 889f61d6778f6cf8048b928dbcba8621
BLAKE2b-256 7b55be259c13d1356a476c16a4c701c3af436ec696bb84a3a32dee52c6ab0bc5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page