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.
文档
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
| Parameter | Default | Description |
|---|---|---|
--input-masks | None | Input water mask GeoTIFF files (ordered by time) |
--transect-spacing | 50.0 | Distance between transects in map units |
--min-channel-width | 20.0 | Minimum channel width for quality flagging |
--shoreline-method | threshold | Shoreline extraction method: threshold, canny, manual |
--water-threshold | 0.0 | Water extraction threshold (NDWI/MNDWI) |
--hotspot-percentile | 90.0 | Percentile threshold for hotspot detection |
--output-dir | ./rmc-output | Output directory |
Output
| File | Description |
|---|---|
shorelines.geojson | Shoreline features for each time period |
centerlines.geojson | Centerline features for each time period |
transects.geojson | Perpendicular transect lines along centerline |
migration_rates.csv | Migration distances and rates per transect |
change_hotspots.geojson | Hotspot features where migration exceeds threshold |
request.json | Analysis request metadata |
dataset-manifest.json | Dataset inventory and period information |
output-manifest.json | Output file inventory and statistics |
qa.json | Quality assurance checks |
Quality Codes
| Code | Name | Description |
|---|---|---|
| 1 | high | Clean intersection, single shoreline crossing |
| 2 | medium | Small migration or minor complexity |
| 3 | low | Multiple intersections, complex geometry |
| 4 | invalid | No intersection or processing error |
Direction Codes
| Code | Name | Description |
|---|---|---|
| -1 | erosion | Shoreline retreats (water expands) |
| 0 | stable | No significant change |
| 1 | deposition | Shoreline 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:
- Sample points along water polygon boundary
- Compute Voronoi diagram of boundary points
- Extract Voronoi vertices inside polygon as centerline
- 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:
- For each transect, find intersection with both shorelines
- Measure distance between intersection points
- 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
| Code | Meaning |
|---|---|
| 0 | Success |
| 2 | Argument error |
| 3 | Dependency missing |
| 6 | Data validation failure |
| 7 | Processing 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 时,走原文件路径 (向后兼容)。
相关技能
Extract flood extent from SAR backscatter imagery. Use when the user wants to analyze changes, detect hazards, or generate assessment reports.
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.
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.
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.
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.