Install
openclaw skills install @ruiduobao/geoskill-web-map-generationGenerate interactive web maps from GeoTIFF or GeoJSON with Leaflet templates and metadata
openclaw skills install @ruiduobao/geoskill-web-map-generationRenders GeoTIFF rasters into georeferenced PNGs and embeds them into self-contained Leaflet HTML maps, so users can zoom, pan, and click to inspect coordinates right in the browser.
Supports both percentile and min-max contrast stretches and 8 matplotlib colormaps; produces a metadata JSON with the geographic extent, stretch endpoints, and statistics, plus a reproducible rendered GeoTIFF.
percentile/min-max linear stretch → matplotlib colormap coloring → PIL PNG encoding (base64 embedded) → Leaflet ImageOverlay.
pip install numpy rasterio scipy matplotlib geopandas shapely pillow
python geoskill-web-map-generation.py --bbox 116.0 39.0 117.0 40.0 --synthetic --output-dir ./out
python geoskill-web-map-generation.py --input dem.tif --cmap terrain --stretch percentile --output-dir ./out
python geoskill-web-map-generation.py --input dem.tif --stretch minmax --opacity 1.0
python geoskill-web-map-generation.py --bbox 116 39 117 40 --synthetic --title "Beijing DEM"
python geoskill-web-map-generation.py --input dem.tif --lo-pct 1 --hi-pct 99
| File | Format | Description |
|---|---|---|
web_map.html | HTML | Self-contained interactive map (primary output) |
rendered.tif | GeoTIFF | Stretched [0,1] rendered raster (verifiable output) |
map_metadata.json | JSON | Extent/colormap/statistics metadata |
Each run also produces output-manifest.json (run manifest).
Local GeoTIFF / vector files; --synthetic mode generates physically consistent simulated data, fully offline.
--synthetic mode requires no network at all.MIT
把 GeoTIFF 栅格渲染为带地理配准的 PNG,并嵌入自包含的 Leaflet HTML 地图,浏览器打开即可缩放、平移、点击查看经纬度。
支持百分位 / min-max 两种对比度拉伸与 8 种 matplotlib 配色;产出含地理范围、拉伸端点与统计的元数据 JSON,以及可复现的渲染栅格 GeoTIFF。
percentile/min-max 线性拉伸 → matplotlib colormap 着色 → PIL 编码 PNG(base64 内嵌) → Leaflet ImageOverlay。
pip install numpy rasterio scipy matplotlib geopandas shapely pillow
python geoskill-web-map-generation.py --bbox 116.0 39.0 117.0 40.0 --synthetic --output-dir ./out
python geoskill-web-map-generation.py --input dem.tif --cmap terrain --stretch percentile --output-dir ./out
python geoskill-web-map-generation.py --input dem.tif --stretch minmax --opacity 1.0
python geoskill-web-map-generation.py --bbox 116 39 117 40 --synthetic --title "北京 DEM"
python geoskill-web-map-generation.py --input dem.tif --lo-pct 1 --hi-pct 99
| 文件 | 格式 | 说明 |
|---|---|---|
web_map.html | HTML | 自包含交互式地图(主产物) |
rendered.tif | GeoTIFF | 拉伸后 [0,1] 渲染栅格(可验证产物) |
map_metadata.json | JSON | 范围/配色/统计元数据 |
每次运行还会产出 output-manifest.json(运行清单)。
本地 GeoTIFF / 矢量文件;--synthetic 模式生成物理一致的模拟数据,完全离线。
--synthetic 模式完全无网络。MIT