360 Secure SkillHub
360 安全技能中心

Geoskill: Urban Expansion Monitor

该 Skill 提供命令行脚本,对前后两期建成区栅格按阈值做变化检测,统计扩张面积与增长率,输出 JSON 统计、HTML 报告和运行清单;也可按 bbox 与日期范围从 Microsoft Planetary Computer 获取 Landsat 影像对后再分析。文档含参数表、输出说明与退出码。

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

安装技能

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

执行命令安装此 skill: npx secure-skills-cli add geoskill-urban-expansion-monitor
Metadata
name
urban-expansion-monitor
description
Detect and quantify urban expansion from multi-temporal built-up rasters. Use when the user wants to analyze changes, compare multi-temporal rasters, compute indices, or generate assessment reports.

Urban Expansion Monitor

Detect and quantify urban expansion from multi-temporal built-up rasters.

CLI Usage

python scripts/urban_expansion_monitor.py --before before.tif --after after.tif
python scripts/urban_expansion_monitor.py --before before.tif --after after.tif --threshold 0.6
python scripts/urban_expansion_monitor.py --before before.tif --after after.tif --output-dir my_output

Data Download

This skill can auto-fetch a pair of Landsat Collection 2 Level-2 scenes from the Microsoft Planetary Computer when given a bounding box + date range. The --date-range is split at the midpoint: the first half is used for --before and the second half for --after.

python scripts/urban_expansion_monitor.py \
  --bbox 116,39,117,40 \
  --date-range 2020-01-01,2024-12-31 \
  --output-dir ./expansion-output

The PYTHONPATH must include the parent of _geoskill_data_fetcher/ (the same directory the 50 skills live in). Set it once:

export PYTHONPATH="/path/to/行业Skill创意-20260727"

Parameters

Argument Required Default Description
--before Yes — Path to "before" built-up raster (continuous built-up index or binary mask)
--after Yes — Path to "after" built-up raster (same grid as --before)
--threshold No 0.5 Built-up classification threshold (values ≥ threshold are considered urban)
--output-dir, -o No expansion-output Directory to write outputs

Output

File Description
expansion-report.json Machine-readable expansion stats (areas, growth rate)
report.html Human-readable HTML report
output-manifest.json Run metadata + result summary

Exit Codes

Code Meaning
0 Success
2 Argument error (e.g. missing input file)
7 Processing failure