编程

Geoskill: Forest Health Monitor

试用

Monitor forest canopy vitality decline, drought stress, pest damage, or wind throw from multi-temporal spectral indices. Distinguishes short-term fluctuations from persistent decline using historical baselines, persistence state machines, and climate attribution. Use when assessing forest health, detecting anomalies, or planning field sampling.

它能做什么

Monitor forest canopy vitality decline, drought stress, pest damage, or wind throw from multi-temporal spectral indices. Distinguishes short-term fluctuations from persistent decline using historical baselines, persistence state machines, and climate attribution. Use when assessing forest health, detecting anomalies, or planning field sampling.

技能文档

Prerequisites / 先准备 X 文件

⚠️ 必读 — 本 skill 不属于即用型,需要先准备特定文件才能跑。

本 skill 需要 bbox + 年份。所有 NDVI/EVI/NDMI/NBR 时序数据自动从 MPC 下载。

👉 完整教程见仓库根目录 PREREQUISITES.md 1.3 节。

先准备 X 文件--synthetic 一行跑通,验证工作流后再传真实 AOI。

快速试跑命令:

python forest_health_monitor.py --synthetic --output-dir ./test

Forest Health Monitor

Detects forest health anomalies from spectral indices (NDVI, EVI, NDMI, NBR) and distinguishes short-term fluctuations from sustained deterioration using historical baselines, a persistence state machine, and climate attribution.

Trigger

Use when the user wants to:

  • Detect forest canopy vitality decline from satellite imagery
  • Distinguish drought stress, pest damage, or wind throw from seasonal variation
  • Identify persistent decline zones vs. short-term fluctuations
  • Correlate forest anomalies with climate variables (SPI/SPEI)
  • Generate stratified sampling plans for field verification
  • Assess forest health by stand type (evergreen, deciduous, mixed)

CLI Usage

# Basic health monitoring with bounding box
python scripts/forest_health_monitor.py \
  --bbox 116.0,39.0,117.0,40.0 \
  --forest-type evergreen \
  --year 2024

# With AOI file and custom indices
python scripts/forest_health_monitor.py \
  --aoi-file forest_aoi.geojson \
  --forest-type-file stand_types.geojson \
  --start-date 2022-01-01 \
  --end-date 2024-12-31 \
  --indices ndvi,evi,ndmi,nbr \
  --persistence 3 \
  --climate-attribution spi

# Full parameter set
python scripts/forest_health_monitor.py \
  --aoi-file aoi.geojson \
  --forest-type mixed \
  --baseline-years 5 \
  --indices ndvi,ndmi,nbr \
  --persistence 2 \
  --climate-attribution spei \
  --output-dir ./fhm-output \
  --overwrite

# Synthetic demo (no AOI/rasters needed)
python scripts/forest_health_monitor.py --synthetic --output-dir ./fhm-output

Parameters

ParameterDefaultDescription
--aoi-fileAOI boundary (GeoJSON/Shapefile)
--bboxBounding box: xmin,ymin,xmax,ymax
--placeNamed place (requires geocoding)
--forest-typemixedForest type: evergreen, deciduous, mixed
--forest-type-fileForest type polygons GeoJSON
--yearcurrentMonitoring year
--start-dateStart date (YYYY-MM-DD)
--end-dateEnd date (YYYY-MM-DD)
--baseline-years5Years for historical baseline
--indicesndvi,evi,ndmi,nbrComma-separated spectral indices
--persistence2Persistence threshold (months)
--climate-attributionspiClimate variable: spi, spei, temperature, precipitation
--severity-schemabuilt-inCustom severity schema JSON
--output-dirfhm-outputOutput directory
--overwritefalseAllow overwriting existing output
--syntheticfalseRun with synthetic demo data (auto-generates NDVI/EVI rasters + AOI)

Output

FileDescription
forest_health.tifMulti-temporal severity classification raster
persistent_decline.geojsonZones with persistent decline
climate_links.csvClimate attribution per zone
timeseries.parquetFull health time series per zone
sampling_plan.geojsonStratified sampling point recommendations
request.jsonInput request record
dataset-manifest.jsonData source manifest
output-manifest.jsonOutput file manifest
qa.jsonQuality assurance report
run.logExecution log

Health Severity Levels

LevelCodeColorCriteria
Healthy000FF00All indices within 1 std of baseline
Mild Stress1FFFF001+ indices below 1.5 std, or alert state
Moderate Decline2FF99002+ indices below 1.5 std, decline state
Severe Decline3FF00002+ indices below 2.0 std, persistent decline
Mortality4990000Extreme decline, absorbing state

Health State Machine

StateDescriptionTransition
stableNormal condition→ alert on anomaly
alertInitial anomaly detected→ decline if persistent
declineSustained deterioration→ recovery if improving
recoveryImproving trend→ stable if sustained
mortalityExtreme decline (absorbing)→ recovery only with strong evidence

Key Design Principles

  1. Stratified baselines: Each forest type (evergreen/deciduous/mixed) has its own phenological baseline. No universal threshold across all forests.
  2. Multi-index consensus: At least 2 indices must agree before flagging high-confidence anomalies.
  3. Three independent dimensions: Anomaly (deviation), Persistence (state machine), Attribution (climate correlation) are reported separately.
  4. Phenology-aware: Deciduous winter NDVI drop is not flagged as disease because the baseline accounts for seasonal amplitude.

Exit Codes

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

Limitations

  • Species and age-class differences affect baseline accuracy
  • Pest/disease attribution typically requires field data
  • Long-term sensor differences require cross-normalization
  • Output is remote sensing analysis support, not regulatory determination

数据下载

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

python forest_health_monitor.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 时,走原文件路径 (向后兼容)。

相关技能

Detect forest disturbance from multi-temporal NDVI. Use when the user wants to analyze changes, detect hazards, or generate assessment reports.

1 次安装

Assess crop health from NDVI time series. Use when the user wants to analyze changes, detect hazards, or generate assessment reports.

1 次安装

Monitor grassland degradation and recovery trends from multi-temporal vegetation cover, phenology, bare ground and climate baselines. Outputs management zones for restoration prioritization. Use when assessing grassland health, identifying degraded areas, evaluating restoration effectiveness, or generating management recommendations.

1 次安装

Compute forest fire burn severity from pre/post-fire NIR and SWIR imagery using differenced Normalized Burn Ratio (dNBR). Classifies severity into unburned, low, moderate, and high categories. Use when the user wants to assess burn severity, map fire damage, or generate burn severity reports.

1 次安装

Estimate forest carbon stock from remote sensing data using BEF, allometric equations, or IPCC Tier 1/2 methods. Includes Monte Carlo uncertainty analysis. Supports raster (GeoTIFF) and tabular (CSV) inputs.