Install
openclaw skills install @ruiduobao/geoskill-map-layout-automationAutomate map layout with title, legend, scale bar and north arrow to PDF or PNG
openclaw skills install @ruiduobao/geoskill-map-layout-automationAutomatically lay out a raster map into a finished cartographic product: map frame + title + legend (colorbar) + scale bar + north arrow, output as high-resolution PNG and vector PDF.
The scale bar length is converted from the map-frame width and the reference latitude into an integer number of kilometers following a 1-2-5 sequence; the north arrow is a standard north-pointing arrow.
meters_per_degree_lon=111320·cos(lat) → scale_bar_km=round(map_width×fraction) → draw_scale_bar/north_arrow data-coordinate decoration → matplotlib layout.
pip install numpy rasterio scipy matplotlib geopandas shapely pillow
python geoskill-map-layout-automation.py --bbox 116.0 39.0 117.0 40.0 --synthetic --output-dir ./out
python geoskill-map-layout-automation.py --input dem.tif --title "terrain of the study area" --cmap viridis
python geoskill-map-layout-automation.py --input dem.tif --no-north
python geoskill-map-layout-automation.py --input dem.tif --bar-fraction 0.35
python geoskill-map-layout-automation.py --input dem.tif --dpi 200
| File | Format | Description |
|---|---|---|
layout.png | PNG | Layout map (main deliverable) |
layout.pdf | Vector version | |
layout_data.tif | GeoTIFF | Data raster (verifiable deliverable) |
layout_meta.json | JSON | Scale bar/element toggles/dpi |
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
把栅格地图自动排版成制图成品:图幅 + 标题 + 图例(colorbar) + 比例尺 + 指北针,输出高分辨率 PNG 与矢量 PDF。
比例尺长度按图幅宽度与参考纬度换算成 1-2-5 序列的整数千米;指北针为标准北向箭头。
meters_per_degree_lon=111320·cos(lat) → scale_bar_km=圆整(图幅宽×fraction) → draw_scale_bar/north_arrow 数据坐标整饰 → matplotlib 排版。
pip install numpy rasterio scipy matplotlib geopandas shapely pillow
python geoskill-map-layout-automation.py --bbox 116.0 39.0 117.0 40.0 --synthetic --output-dir ./out
python geoskill-map-layout-automation.py --input dem.tif --title "研究区地形" --cmap viridis
python geoskill-map-layout-automation.py --input dem.tif --no-north
python geoskill-map-layout-automation.py --input dem.tif --bar-fraction 0.35
python geoskill-map-layout-automation.py --input dem.tif --dpi 200
| 文件 | 格式 | 说明 |
|---|---|---|
layout.png | PNG | 排版地图(主产物) |
layout.pdf | 矢量版 | |
layout_data.tif | GeoTIFF | 数据栅格(可验证产物) |
layout_meta.json | JSON | 比例尺/元素开关/dpi |
每次运行还会产出 output-manifest.json(运行清单)。
本地 GeoTIFF / 矢量文件;--synthetic 模式生成物理一致的模拟数据,完全离线。
--synthetic 模式完全无网络。MIT