-
Notifications
You must be signed in to change notification settings - Fork 86
Add landscape fragmentation metrics and habitat connectivity #1141
Description
Ecology and conservation workflows need landscape pattern metrics and connectivity analysis. Neither is currently available in xarray-spatial.
Scope
Landscape metrics (FRAGSTATS-style)
Patch-level and landscape-level metrics computed on categorical rasters:
- Patch area, perimeter, shape index
- Edge density
- Core area
- Fractal dimension
- Contagion
These should work both per-class and landscape-wide.
Fragmentation assessment
- Effective mesh size
- Patch cohesion
Resistance-surface connectivity
- Least-cost corridor networks between multiple source patches. This extends the existing pairwise
least_cost_corridor()to handle N source patches simultaneously and produce a combined corridor surface. - Circuit-theory connectivity (Circuitscape-style current flow). This requires a sparse linear solve and is computationally expensive, but it's in very high demand for conservation planning.
Design notes
Landscape metrics operate on categorical rasters and pair naturally with existing regions() for patch identification. The regions output can feed directly into metric computation.
Circuit-theory connectivity is the most complex piece here. A basic implementation could use scipy sparse solvers on CPU and cuSparse on GPU. Even a simplified version (e.g., pairwise resistance distance without full current maps) would be useful.