Install
openclaw skills install @ruiduobao/geoskill-sar-urban-mapping基于SAR后向散射与GLCM纹理的城市建成区提取:Otsu/固定σ⁰阈值 + GLCM对比度纹理 + 形态学闭运算,输出城市范围二值GeoTIFF与面积统计JSON。SAR urban/built-up mapping via backscatter threshold, GLCM texture and morphology.
openclaw skills install @ruiduobao/geoskill-sar-urban-mappingExtracts urban / built-up areas from single-temporal SAR backscatter (σ⁰, linear power). Physical basis:
Method workflow:
--threshold auto determines the σ⁰ threshold automatically via Otsu's maximum inter-class variance; a fixed linear σ⁰ threshold may also be passed.--texture true): applies an additional GLCM contrast threshold (Otsu) to suppress false positives from bare soil / calm water, which show high σ⁰ but uniform texture.pip install numpy rasterio scipy
python geoskill-sar-urban-mapping.py --bbox 116.0 39.0 117.0 40.0 --output-dir ./out
python geoskill-sar-urban-mapping.py --bbox 116 39 117 40 --synthetic --output-dir ./syn
python geoskill-sar-urban-mapping.py --input sigma0_linear.tif --output-dir ./real
python geoskill-sar-urban-mapping.py --input sigma0.tif --threshold 0.05 --texture false --output-dir ./fixed
python geoskill-sar-urban-mapping.py --bbox 121.0 31.0 122.0 32.0 --output-dir ./shanghai --quiet
| File | Format | Description |
|---|---|---|
urban_mask.tif | GeoTIFF (uint8) | Binary urban extent mask (1=urban, 0=non-urban), EPSG:4326 |
urban_statistics.json | JSON | Urban pixel count / fraction / area (km²), threshold (dB), etc. |
output-manifest.json | JSON | Run manifest |
--synthetic involves no network at all.MIT
从单时相 SAR 后向散射(σ⁰,线性功率)中提取城市 / 建成区。物理依据:
方法流程:
--threshold auto 用 Otsu 最大类间方差自动确定 σ⁰ 门限,
也可传入固定线性 σ⁰ 门限。--texture true):叠加 GLCM 对比度门限(Otsu),抑制
高 σ⁰ 但纹理均匀的裸土 / 静水误检。pip install numpy rasterio scipy
python geoskill-sar-urban-mapping.py --bbox 116.0 39.0 117.0 40.0 --output-dir ./out
python geoskill-sar-urban-mapping.py --bbox 116 39 117 40 --synthetic --output-dir ./syn
python geoskill-sar-urban-mapping.py --input sigma0_linear.tif --output-dir ./real
python geoskill-sar-urban-mapping.py --input sigma0.tif --threshold 0.05 --texture false --output-dir ./fixed
python geoskill-sar-urban-mapping.py --bbox 121.0 31.0 122.0 32.0 --output-dir ./shanghai --quiet
| 文件 | 格式 | 说明 |
|---|---|---|
urban_mask.tif | GeoTIFF (uint8) | 城市范围二值掩膜(1=城市,0=非城市),EPSG:4326 |
urban_statistics.json | JSON | 城市像元数 / 占比 / 面积(km²)、阈值(dB)等 |
output-manifest.json | JSON | 运行清单 |
--synthetic 无任何网络。MIT