Motivation
xarray-spatial handles single-time raster analysis well, but lacks tools for multi-temporal workflows. With Sentinel-2, MODIS, and Landsat time series now standard inputs, users regularly need change detection and trend analysis on stacked rasters. Currently this means writing custom code or pulling in unrelated libraries.
Scope
Image differencing and change vectors:
- Simple band differencing between two dates
- Change vector analysis (CVA) that computes magnitude and direction of change across multiple bands
Land cover transitions:
- From/to transition matrices with area estimates (goes beyond what
zonal_crosstab does today)
- Per-class gain/loss/swap/net-change decomposition
Pixel-level trend analysis:
- Mann-Kendall test for monotonic trend detection over a time series
- Theil-Sen slope estimator (robust to outliers, good for NDVI trends)
Phenology extraction from NDVI time series:
- Start of season, end of season, peak timing
- Seasonal amplitude and integrated greenness
Implementation notes
- Should work with xarray's time dimension natively, operating along the time axis of a 3D (time, y, x) DataArray.
- Dask support matters here more than usual since time stacks can be tens of GB. Per-pixel operations (trend tests, phenology) parallelize naturally across spatial chunks.
- Mann-Kendall and Theil-Sen are per-pixel reductions along the time axis, similar to how
apply_ufunc works.
- Phenology extraction will likely need interpolation or smoothing as a preprocessing step. Could use a simple Savitzky-Golay filter or similar.
Motivation
xarray-spatial handles single-time raster analysis well, but lacks tools for multi-temporal workflows. With Sentinel-2, MODIS, and Landsat time series now standard inputs, users regularly need change detection and trend analysis on stacked rasters. Currently this means writing custom code or pulling in unrelated libraries.
Scope
Image differencing and change vectors:
Land cover transitions:
zonal_crosstabdoes today)Pixel-level trend analysis:
Phenology extraction from NDVI time series:
Implementation notes
apply_ufuncworks.