Install
openclaw skills install @ruiduobao/geoskill-format-batch-converter基于 GDAL / OGR 批量转换栅格与矢量格式 (GeoTIFF / Shapefile / GeoPackage / GeoJSON) 并记录日志。Batch convert raster and vector formats (GeoTIFF / Shapefile / GeoPackage / GeoJSON) via GDAL / OGR with logging.
openclaw skills install @ruiduobao/geoskill-format-batch-converterBatch-converts raster and vector formats with GDAL/OGR (via rasterio / fiona / geopandas):
--input may point to a single file or a directory (--recursive scans subdirectories); the type is auto-detected by extension, with rasters converted to --raster-target and vectors to --vector-target. Every conversion writes a structured log entry (source, target, status, byte count); unsupported extensions are logged as skipped and parse failures as error, neither of which interrupts the batch run.
--synthetic mode generates a small local source set — a GeoTIFF + GeoJSON points + Shapefile polygons — to demonstrate the full batch conversion offline.
pip install numpy rasterio geopandas shapely fiona pyproj
python geoskill-format-batch-converter.py --bbox 116.0 39.0 117.0 40.0 --synthetic --output-dir ./out
python geoskill-format-batch-converter.py --bbox 116.0 39.0 117.0 40.0 --synthetic --vector-target gpkg --output-dir ./gpkg
python geoskill-format-batch-converter.py --input ./raw_data --vector-target geojson --recursive --output-dir ./geojson_all
python geoskill-format-batch-converter.py --input ./shapefiles --vector-target gpkg --output-dir ./gpkg_batch
python geoskill-format-batch-converter.py --input scene.tif --output-dir ./recompressed
python geoskill-format-batch-converter.py --bbox 121.0 31.0 122.0 32.0 --synthetic --vector-target shp --output-dir ./shp_out --quiet
| File | Format | Description |
|---|---|---|
converted/* | Target format | Converted files |
conversion_log.json | JSON | Per-file conversion log + summary |
output-manifest.json | JSON | Run manifest |
--input: local files or a directory--synthetic: locally generated mixed source set--synthetic mode requires no network at all.MIT
用 GDAL/OGR(经 rasterio / fiona / geopandas)批量转换栅格与矢量格式:
--input 可指向单个文件或目录(--recursive 递归子目录);按扩展名
自动识别类型,栅格转到 --raster-target、矢量转到 --vector-target。
每次转换记录结构化日志(来源、目标、状态、字节数),不支持的扩展名
记为 skipped、解析失败记为 error,均不中断批处理。
--synthetic 模式在本地生成一个小 GeoTIFF + GeoJSON 点 + Shapefile 面
源集,离线演示完整批量转换。
pip install numpy rasterio geopandas shapely fiona pyproj
python geoskill-format-batch-converter.py --bbox 116.0 39.0 117.0 40.0 --synthetic --output-dir ./out
python geoskill-format-batch-converter.py --bbox 116.0 39.0 117.0 40.0 --synthetic --vector-target gpkg --output-dir ./gpkg
python geoskill-format-batch-converter.py --input ./raw_data --vector-target geojson --recursive --output-dir ./geojson_all
python geoskill-format-batch-converter.py --input ./shapefiles --vector-target gpkg --output-dir ./gpkg_batch
python geoskill-format-batch-converter.py --input scene.tif --output-dir ./recompressed
python geoskill-format-batch-converter.py --bbox 121.0 31.0 122.0 32.0 --synthetic --vector-target shp --output-dir ./shp_out --quiet
| 文件 | 格式 | 说明 |
|---|---|---|
converted/* | 目标格式 | 转换后的文件 |
conversion_log.json | JSON | 逐文件转换日志 + 汇总 |
output-manifest.json | JSON | 运行清单 |
--input:本地文件或目录--synthetic:本地生成混合源集--synthetic 模式完全无网络。MIT