360 Secure SkillHub
360 安全技能中心

Geoskill: Forest Disturbance Alert

该 Skill 以命令行脚本读取基线与当期 NDVI 栅格,按阈值判定 NDVI 下降区域,生成 JSON 扰动统计、HTML 报告与运行清单;也可按边界框和日期范围自动下载数据,支持自定义阈值、输出目录与 GeoJSON 范围文件。

ruiduobao
ruiduobao
热度 19.18
最近更新 2026-07-31 19:56:14
分类:数据依赖:代码执行 / 读写文件 / 第三方 API应用场景:数据处理 / 报告撰写 / 研究

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add geoskill-forest-disturbance-alert
Metadata
name
forest-disturbance-alert
description
Detect forest disturbance from multi-temporal NDVI. Use when the user wants to analyze changes, detect hazards, or generate assessment reports.

Forest Disturbance Alert

Detect forest disturbance from multi-temporal NDVI.

CLI Usage

python scripts/forest_disturbance_alert.py --baseline baseline.tif --current current.tif
python scripts/forest_disturbance_alert.py --baseline baseline.tif --current current.tif --threshold 0.25
python scripts/forest_disturbance_alert.py --baseline baseline.tif --current current.tif --output-dir my_output

Parameters

Argument Required Default Description
--baseline Yes — Path to baseline (undisturbed) NDVI raster
--current Yes — Path to current NDVI raster (same grid as --baseline)
--threshold No 0.2 NDVI drop threshold (current − baseline < −threshold is flagged)
--output-dir, -o No disturbance-output Directory to write outputs

Output

File Description
disturbance-report.json Machine-readable disturbance stats (affected area, severity classes)
report.html Human-readable HTML report
output-manifest.json Run metadata + result summary

Exit Codes

Code Meaning
0 Success
2 Argument error
7 Processing failure

数据下载

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

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

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