Add landscape fragmentation metrics and habitat connectivity
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 20/100
Research direction
Begin by narrowing the proposal into a specific metric or connectivity feature, then inspect the existing regions() and least_cost_corridor() entry points. Done should be defined by an agreed subset, documented categorical-raster inputs and outputs, and tests for the selected metrics; no test files are named here.
Written by the indexing model from the issue text.
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.
- 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
-
area/auth bug comp/agent P3 platform/discord type/security
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
NousResearch/hermes-agent#117848 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
bancolombia/sentinel#23 ·
-
test md OpenCI
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
bug client
Difficulty 2/5 1-3 hours Newbie friendliness 88/100