Add temporal analysis and raster change detection
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 30/100
Research direction
No specific files, entry points, or tests are named. Start by reviewing the existing raster-analysis algorithms and their xarray time-dimension handling, then define the smallest supported slice of the proposed scope. Done should include the selected temporal-analysis capability, documented behavior for stacked rasters, and validation of Dask-compatible per-pixel processing.
Written by the indexing model from the issue text.
Description
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_crosstabdoes 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_ufuncworks. - Phenology extraction will likely need interpolation or smoothing as a preprocessing step. Could use a simple Savitzky-Golay filter or similar.
- Dominant language
- Python
- Stars
- 972
- Forks
- 92
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 7
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from xarray-contrib/xarray-spatial
-
Difficulty 1/5 Under an hour Newbie friendliness 68/100
xarray-contrib/xarray-spatial#3726 ·
-
api area:surface bug severity:medium sweep-api-consistency
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
xarray-contrib/xarray-spatial#3712 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
xarray-contrib/xarray-spatial#3710 ·
-
bug
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
xarray-contrib/xarray-spatial#3707 ·
-
area:surface documentation user-guide-example
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
xarray-contrib/xarray-spatial#3464 ·
All issues in xarray-contrib/xarray-spatial
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
zostera/django-bootstrap4#894 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
use-agent-os/agent-os#3276 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
zephyrproject-rtos/zephyr#119726 ·
-
area/auth bug comp/agent P3 platform/discord type/security
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
NousResearch/hermes-agent#117848 ·