Skip to content

Commit 5c39826

Browse files
committed
Merge origin/master, resolve accessor.py conflicts (#969)
2 parents b0f5494 + a61e006 commit 5c39826

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+8026
-298
lines changed

README.md

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,17 @@ In the GIS world, rasters are used for representing continuous phenomena (e.g. e
172172

173173
-------
174174

175+
### **Morphological**
176+
177+
| Name | Description | NumPy xr.DataArray | Dask xr.DataArray | CuPy GPU xr.DataArray | Dask GPU xr.DataArray |
178+
|:----------:|:------------|:----------------------:|:--------------------:|:-------------------:|:------:|
179+
| [Erode](xrspatial/morphology.py) | Morphological erosion (local minimum over structuring element) | ✅️ | ✅️ | ✅️ | ✅️ |
180+
| [Dilate](xrspatial/morphology.py) | Morphological dilation (local maximum over structuring element) | ✅️ | ✅️ | ✅️ | ✅️ |
181+
| [Opening](xrspatial/morphology.py) | Erosion then dilation (removes small bright features) | ✅️ | ✅️ | ✅️ | ✅️ |
182+
| [Closing](xrspatial/morphology.py) | Dilation then erosion (fills small dark gaps) | ✅️ | ✅️ | ✅️ | ✅️ |
183+
184+
-------
185+
175186
### **Fire**
176187

177188
| Name | Description | NumPy xr.DataArray | Dask xr.DataArray | CuPy GPU xr.DataArray | Dask GPU xr.DataArray |
@@ -197,6 +208,8 @@ In the GIS world, rasters are used for representing continuous phenomena (e.g. e
197208
| [Normalized Burn Ratio (NBR)](xrspatial/multispectral.py) | Measures burn severity using NIR and SWIR band difference | ✅️ |✅️ | ✅️ |✅️ |
198209
| [Normalized Burn Ratio 2 (NBR2)](xrspatial/multispectral.py) | Refines burn severity mapping using two SWIR bands | ✅️ |✅️ | ✅️ |✅️ |
199210
| [Normalized Difference Moisture Index (NDMI)](xrspatial/multispectral.py) | Detects vegetation moisture stress from NIR and SWIR reflectance | ✅️ |✅️ | ✅️ |✅️ |
211+
| [Normalized Difference Water Index (NDWI)](xrspatial/multispectral.py) | Maps open water bodies using green and NIR band difference | ✅️ |✅️ | ✅️ |✅️ |
212+
| [Modified Normalized Difference Water Index (MNDWI)](xrspatial/multispectral.py) | Detects water in urban areas using green and SWIR bands | ✅️ |✅️ | ✅️ |✅️ |
200213
| [Normalized Difference Vegetation Index (NDVI)](xrspatial/multispectral.py) | Quantifies vegetation density from red and NIR band difference | ✅️ |✅️ | ✅️ |✅️ |
201214
| [Soil Adjusted Vegetation Index (SAVI)](xrspatial/multispectral.py) | Vegetation index with soil brightness correction factor | ✅️ |✅️ | ✅️ |✅️ |
202215
| [Structure Insensitive Pigment Index (SIPI)](xrspatial/multispectral.py) | Estimates carotenoid-to-chlorophyll ratio for plant stress detection | ✅️ |✅️ | ✅️ |✅️ |
@@ -229,6 +242,7 @@ In the GIS world, rasters are used for representing continuous phenomena (e.g. e
229242
| [Allocation](xrspatial/proximity.py) | Assigns each cell to the identity of the nearest source feature | ✅️ || ✅️ | ✅️ |
230243
| [Balanced Allocation](xrspatial/balanced_allocation.py) | Partitions a cost surface into territories of roughly equal cost-weighted area | ✅️ || ✅️ | ✅️ |
231244
| [Cost Distance](xrspatial/cost_distance.py) | Computes minimum accumulated cost to the nearest source through a friction surface | ✅️ || ✅️ | ✅️ |
245+
| [Least-Cost Corridor](xrspatial/corridor.py) | Identifies zones of low cumulative cost between two source locations | ✅️ || ✅️ | ✅️ |
232246
| [Direction](xrspatial/proximity.py) | Computes the direction from each cell to the nearest source feature | ✅️ || ✅️ | ✅️ |
233247
| [Proximity](xrspatial/proximity.py) | Computes the distance from each cell to the nearest source feature | ✅️ || ✅️ | ✅️ |
234248
| [Surface Distance](xrspatial/surface_distance.py) | Computes distance along the 3D terrain surface to the nearest source | ✅️ || ✅️ | ✅️ |
@@ -257,11 +271,12 @@ In the GIS world, rasters are used for representing continuous phenomena (e.g. e
257271
| [Terrain Generation](xrspatial/terrain.py) | Generates synthetic terrain from fBm or ridged fractal noise with optional domain warping, Worley blending, and hydraulic erosion | ✅️ | ✅️ | ✅️ | ✅️ |
258272
| [TPI](xrspatial/terrain_metrics.py) | Computes Topographic Position Index (center minus mean of neighbors) | ✅️ | ✅️ | ✅️ | ✅️ |
259273
| [TRI](xrspatial/terrain_metrics.py) | Computes Terrain Ruggedness Index (local elevation variation) | ✅️ | ✅️ | ✅️ | ✅️ |
274+
| [Landforms](xrspatial/terrain_metrics.py) | Classifies terrain into 10 landform types using the Weiss (2001) TPI scheme | ✅️ | ✅️ | ✅️ | ✅️ |
260275
| [Viewshed](xrspatial/viewshed.py) | Determines visible cells from a given observer point on terrain | ✅️ | ✅️ | ✅️ | ✅️ |
261276
| [Min Observable Height](xrspatial/experimental/min_observable_height.py) | Finds the minimum observer height needed to see each cell *(experimental)* | ✅️ | | | |
262277
| [Perlin Noise](xrspatial/perlin.py) | Generates smooth continuous random noise for procedural textures | ✅️ | ✅️ | ✅️ | ✅️ |
263278
| [Worley Noise](xrspatial/worley.py) | Generates cellular (Voronoi) noise returning distance to the nearest feature point | ✅️ | ✅️ | ✅️ | ✅️ |
264-
| [Hydraulic Erosion](xrspatial/erosion.py) | Simulates particle-based water erosion to carve valleys and deposit sediment | ✅️ | 🔄 | 🔄 | 🔄 |
279+
| [Hydraulic Erosion](xrspatial/erosion.py) | Simulates particle-based water erosion to carve valleys and deposit sediment | ✅️ | ✅️ | ✅️ | ✅️ |
265280
| [Bump Mapping](xrspatial/bump.py) | Adds randomized bump features to simulate natural terrain variation | ✅️ | ✅️ | ✅️ | ✅️ |
266281

267282
-----------
@@ -272,13 +287,17 @@ In the GIS world, rasters are used for representing continuous phenomena (e.g. e
272287
|:----------:|:------------|:----------------------:|:--------------------:|:-------------------:|:------:|
273288
| [Flow Direction (D8)](xrspatial/flow_direction.py) | Computes D8 flow direction from each cell toward the steepest downhill neighbor | ✅️ | ✅️ | ✅️ | ✅️ |
274289
| [Flow Direction (Dinf)](xrspatial/flow_direction_dinf.py) | Computes D-infinity flow direction as a continuous angle toward the steepest downslope facet | ✅️ | ✅️ | ✅️ | ✅️ |
275-
| [Flow Accumulation (D8)](xrspatial/flow_accumulation.py) | Counts upstream cells draining through each cell in a D8 flow direction grid | ✅️ | ✅️ | ✅️ | 🔄 |
276-
| [Watershed](xrspatial/watershed.py) | Labels each cell with the pour point it drains to via D8 flow direction | ✅️ | ✅️ | ✅️ | 🔄 |
277-
| [Basins](xrspatial/watershed.py) | Delineates drainage basins by labeling each cell with its outlet ID | ✅️ | ✅️ | ✅️ | 🔄 |
278-
| [Stream Order](xrspatial/stream_order.py) | Assigns Strahler or Shreve stream order to cells in a drainage network | ✅️ | ✅️ | ✅️ | 🔄 |
279-
| [Stream Link](xrspatial/stream_link.py) | Assigns unique IDs to each stream segment between junctions | ✅️ | ✅️ | ✅️ | 🔄 |
280-
| [Snap Pour Point](xrspatial/snap_pour_point.py) | Snaps pour points to the highest-accumulation cell within a search radius | ✅️ | ✅️ | 🔄 | 🔄 |
290+
| [Flow Direction (MFD)](xrspatial/flow_direction_mfd.py) | Partitions flow to all downslope neighbors with an adaptive exponent (Qin et al. 2007) | ✅️ | ✅️ | ✅️ | ✅️ |
291+
| [Flow Accumulation (D8)](xrspatial/flow_accumulation.py) | Counts upstream cells draining through each cell in a D8 flow direction grid | ✅️ | ✅️ | ✅️ | ✅️ |
292+
| [Flow Accumulation (MFD)](xrspatial/flow_accumulation_mfd.py) | Accumulates upstream area through all MFD flow paths weighted by directional fractions | ✅️ | ✅️ | ✅️ | 🔄 |
293+
| [Watershed](xrspatial/watershed.py) | Labels each cell with the pour point it drains to via D8 flow direction | ✅️ | ✅️ | ✅️ | ✅️ |
294+
| [Basins](xrspatial/watershed.py) | Delineates drainage basins by labeling each cell with its outlet ID | ✅️ | ✅️ | ✅️ | ✅️ |
295+
| [Stream Order](xrspatial/stream_order.py) | Assigns Strahler or Shreve stream order to cells in a drainage network | ✅️ | ✅️ | ✅️ | ✅️ |
296+
| [Stream Link](xrspatial/stream_link.py) | Assigns unique IDs to each stream segment between junctions | ✅️ | ✅️ | ✅️ | ✅️ |
297+
| [Snap Pour Point](xrspatial/snap_pour_point.py) | Snaps pour points to the highest-accumulation cell within a search radius | ✅️ | ✅️ | ✅️ | ✅️ |
281298
| [Flow Path](xrspatial/flow_path.py) | Traces downstream flow paths from start points through a D8 direction grid | ✅️ | ✅️ | 🔄 | 🔄 |
299+
| [HAND](xrspatial/hand.py) | Computes Height Above Nearest Drainage by tracing D8 flow to the nearest stream cell | ✅️ | ✅️ | 🔄 | 🔄 |
300+
| [TWI](xrspatial/twi.py) | Topographic Wetness Index: ln(specific catchment area / tan(slope)) | ✅️ | ✅️ | ✅️ | 🔄 |
282301

283302
-----------
284303

@@ -298,7 +317,7 @@ In the GIS world, rasters are used for representing continuous phenomena (e.g. e
298317
| Name | Description | NumPy xr.DataArray | Dask xr.DataArray | CuPy GPU xr.DataArray | Dask GPU xr.DataArray |
299318
|:----------:|:------------|:----------------------:|:--------------------:|:-------------------:|:------:|
300319
| [IDW](xrspatial/interpolate/_idw.py) | Inverse Distance Weighting from scattered points to a raster grid | ✅️ | ✅️ | ✅️ | ✅️ |
301-
| [Kriging](xrspatial/interpolate/_kriging.py) | Ordinary Kriging with automatic variogram fitting (spherical, exponential, gaussian) | ✅️ | ✅️ | | |
320+
| [Kriging](xrspatial/interpolate/_kriging.py) | Ordinary Kriging with automatic variogram fitting (spherical, exponential, gaussian) | ✅️ | ✅️ | ✅️ | ✅️ |
302321
| [Spline](xrspatial/interpolate/_spline.py) | Thin Plate Spline interpolation with optional smoothing | ✅️ | ✅️ | ✅️ | ✅️ |
303322

304323
-----------

docs/source/reference/hydrology.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,27 @@ Flow Direction (D-infinity)
1818

1919
xrspatial.flow_direction_dinf.flow_direction_dinf
2020

21+
Flow Direction (MFD)
22+
====================
23+
.. autosummary::
24+
:toctree: _autosummary
25+
26+
xrspatial.flow_direction_mfd.flow_direction_mfd
27+
2128
Flow Accumulation
2229
=================
2330
.. autosummary::
2431
:toctree: _autosummary
2532

2633
xrspatial.flow_accumulation.flow_accumulation
2734

35+
Flow Accumulation (MFD)
36+
=======================
37+
.. autosummary::
38+
:toctree: _autosummary
39+
40+
xrspatial.flow_accumulation_mfd.flow_accumulation_mfd
41+
2842
Flow Length
2943
===========
3044
.. autosummary::

docs/source/reference/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ Reference
1515
focal
1616
hydrology
1717
interpolation
18+
morphology
1819
multispectral
1920
pathfinding
2021
proximity
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
.. _reference.morphology:
2+
3+
**********
4+
Morphology
5+
**********
6+
7+
Erode
8+
=====
9+
.. autosummary::
10+
:toctree: _autosummary
11+
12+
xrspatial.morphology.morph_erode
13+
14+
Dilate
15+
======
16+
.. autosummary::
17+
:toctree: _autosummary
18+
19+
xrspatial.morphology.morph_dilate
20+
21+
Opening
22+
=======
23+
.. autosummary::
24+
:toctree: _autosummary
25+
26+
xrspatial.morphology.morph_opening
27+
28+
Closing
29+
=======
30+
.. autosummary::
31+
:toctree: _autosummary
32+
33+
xrspatial.morphology.morph_closing
34+
35+
Kernel Construction
36+
===================
37+
.. autosummary::
38+
:toctree: _autosummary
39+
40+
xrspatial.morphology._circle_kernel

docs/source/reference/multispectral.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,20 @@ Normalized Difference Moisture Index (NDMI)
5353

5454
xrspatial.multispectral.ndmi
5555

56+
Normalized Difference Water Index (NDWI)
57+
========================================
58+
.. autosummary::
59+
:toctree: _autosummary
60+
61+
xrspatial.multispectral.ndwi
62+
63+
Modified Normalized Difference Water Index (MNDWI)
64+
==================================================
65+
.. autosummary::
66+
:toctree: _autosummary
67+
68+
xrspatial.multispectral.mndwi
69+
5670
Normalized Difference Vegetation Index (NDVI)
5771
=============================================
5872
.. autosummary::

docs/source/reference/proximity.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,13 @@ Cost Distance
3535

3636
xrspatial.cost_distance.cost_distance
3737

38+
Least-Cost Corridor
39+
====================
40+
.. autosummary::
41+
:toctree: _autosummary
42+
43+
xrspatial.corridor.least_cost_corridor
44+
3845
Balanced Allocation
3946
====================
4047
.. autosummary::

docs/source/reference/terrain_metrics.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,10 @@ Terrain Ruggedness Index (TRI)
2424
:toctree: _autosummary
2525

2626
xrspatial.terrain_metrics.tri
27+
28+
Landform Classification
29+
=======================
30+
.. autosummary::
31+
:toctree: _autosummary
32+
33+
xrspatial.terrain_metrics.landforms

0 commit comments

Comments
 (0)