文档

Geoskill: River Morphology Change

试用

Extract shorelines, centerlines and channel widths from multi-temporal water body masks. Quantify shoreline migration, channel migration, change hotspots and migration zones. Use when analyzing river channel changes, identifying erosion/deposition areas, or generating river morphology reports.

它能做什么

Extract shorelines, centerlines and channel widths from multi-temporal water body masks. Quantify shoreline migration, channel migration, change hotspots and migration zones. Use when analyzing river channel changes, identifying erosion/deposition areas, or generating river morphology reports.

技能文档

River Morphology Change

Extracts shorelines, centerlines, and channel widths from multi-temporal water body masks. Quantifies shoreline migration, channel migration, and change hotspots.

Trigger

Use when the user wants to:

  • Analyze river channel migration from multi-temporal imagery
  • Identify erosion and deposition areas along river banks
  • Compute channel width changes over time
  • Detect change hotspots where migration is most severe
  • Generate river morphology change reports
  • Compare shorelines between different time periods

CLI Usage

# Basic analysis with default parameters
python scripts/river_morphology_change.py --output-dir ./rmc-output

# Custom transect spacing and hotspot percentile
python scripts/river_morphology_change.py \
  --transect-spacing 30.0 \
  --hotspot-percentile 85.0 \
  --output-dir ./rmc-output

# With custom water threshold
python scripts/river_morphology_change.py \
  --water-threshold 0.1 \
  --min-channel-width 15.0 \
  --output-dir ./rmc-output

Parameters

ParameterDefaultDescription
--input-masksNoneInput water mask GeoTIFF files (ordered by time)
--transect-spacing50.0Distance between transects in map units
--min-channel-width20.0Minimum channel width for quality flagging
--shoreline-methodthresholdShoreline extraction method: threshold, canny, manual
--water-threshold0.0Water extraction threshold (NDWI/MNDWI)
--hotspot-percentile90.0Percentile threshold for hotspot detection
--output-dir./rmc-outputOutput directory

Output

FileDescription
shorelines.geojsonShoreline features for each time period
centerlines.geojsonCenterline features for each time period
transects.geojsonPerpendicular transect lines along centerline
migration_rates.csvMigration distances and rates per transect
change_hotspots.geojsonHotspot features where migration exceeds threshold
request.jsonAnalysis request metadata
dataset-manifest.jsonDataset inventory and period information
output-manifest.jsonOutput file inventory and statistics
qa.jsonQuality assurance checks

Quality Codes

CodeNameDescription
1highClean intersection, single shoreline crossing
2mediumSmall migration or minor complexity
3lowMultiple intersections, complex geometry
4invalidNo intersection or processing error

Direction Codes

CodeNameDescription
-1erosionShoreline retreats (water expands)
0stableNo significant change
1depositionShoreline advances (water contracts)

Key Algorithms

Water Body Extraction

Uses NDWI (Normalized Difference Water Index) or MNDWI (Modified NDWI) to extract water bodies from multispectral imagery:

  • NDWI = (Green - NIR) / (Green + NIR)
  • MNDWI = (Green - SWIR1) / (Green + SWIR1)

Centerline Extraction

Uses Voronoi-based medial axis extraction:

  1. Sample points along water polygon boundary
  2. Compute Voronoi diagram of boundary points
  3. Extract Voronoi vertices inside polygon as centerline
  4. Fallback to bounding box centerline if scipy unavailable

Transect Generation

Generates perpendicular transects along the centerline at regular intervals. Each transect is perpendicular to the local tangent direction.

Migration Rate Computation

Uses perpendicular intersection method:

  1. For each transect, find intersection with both shorelines
  2. Measure distance between intersection points
  3. Determine direction (erosion/deposition) based on distance from center

Change Hotspot Detection

Identifies transects where migration distance exceeds the specified percentile threshold (default: 90th percentile).

Exit Codes

CodeMeaning
0Success
2Argument error
3Dependency missing
6Data validation failure
7Processing failure

Limitations

  • Water level changes may be misinterpreted as morphological change
  • Narrow channels near pixel resolution limit have reduced accuracy
  • Centerline topology handling is complex for braided/anastomosing channels
  • Results are auxiliary analysis only; engineering decisions require manual review
  • Same-season imagery recommended to minimize water level effects

References

  • Pavelsky & Smith 2008, IEEE GRSL (RivWidth algorithm)
  • Isikdogan et al. 2017, IGARSS (RivMap automatic river width extraction)
  • Fisher et al. 2013, Nature Geoscience (global river delta assessment)

数据下载

本 skill 可自动从 Microsoft Planetary Computer 下载数据 (无需 API key):

python river_morphology_change.py --bbox 116,39,117,40 --date-range 2024-06-01,2024-06-30 --output-dir 
  • --bbox W,S,E,N: WGS-84 边界框 (西, 南, 东, 北)
  • --date-range START,END: 日期范围 (YYYY-MM-DD,YYYY-MM-DD)
  • --aoi-file : 替代 --bbox 的 GeoJSON 多边形
  • --cache-dir : 缓存目录 (默认 ~/.geoskill_cache)

当用户只给 --bbox + --date-range (没有 --image) 时,skill 自动下载数据。 当用户给 --image 时,走原文件路径 (向后兼容)。

相关技能

Multi-temporal shoreline change rate analysis. Generates transects, computes Endpoint Rate (EPR) and Linear Regression Rate (LRR), and identifies erosion hotspots. Use when monitoring coastline retreat/accretion or identifying erosion-prone segments.

1 次安装

Extract flood extent from SAR backscatter imagery. Use when the user wants to analyze changes, detect hazards, or generate assessment reports.

1 次安装

Automated watershed delineation from DEM. Computes D8 flow direction, flow accumulation, delineates watersheds from outlet points, extracts stream networks, and generates statistics. Use when the user wants to delineate a watershed, compute flow accumulation, extract streams, or analyze hydrological characteristics from a DEM.

1 次安装

Monitor wetland extent, inundation frequency, and land cover transitions to identify degradation, recovery, and human encroachment. Use when the user wants to track wetland changes over time, assess wetland health, or detect conversion of wetlands to other land covers.

1 次安装

Establish level-area-storage relationships from multi-period water surface, DEM, and water level data. Monitor reservoir capacity change and sedimentation trends. Use when analyzing reservoir storage changes, estimating current capacity, or detecting sedimentation from area-level curve shifts.

1 次安装

Overlay flood extent with population, buildings, roads, and cropland to estimate affected objects and generate impact reports. Use when the user wants to assess flood impact, count affected population/roads/buildings, or generate flood impact summaries from a flood extent raster.

1 次安装