Install
openclaw skills install @ruiduobao/geoskill-vector-convertConvert vector GIS data between Shapefile, GeoJSON, KML, GPX, GeoPackage, and CSV formats using only Python standard library with CRS and clipping options.
openclaw skills install @ruiduobao/geoskill-vector-convertConvert between vector GIS formats using only Python standard library.
| Format | Extension | Read | Write |
|---|---|---|---|
| Shapefile | .shp | Yes | Yes |
| GeoJSON | .geojson/.json | Yes | Yes |
| KML | .kml | Yes | Yes |
| GPX | .gpx | Yes | Yes |
| GeoPackage | .gpkg | Yes | Yes |
| CSV | .csv | Yes | Yes |
Zero external dependencies. Requires Python 3.8+.
python vector-convert.py input.shp --to geojson -o output.geojson
python vector-convert.py input.geojson --to shp -o output.shp
python vector-convert.py input.kml --to gpkg -o output.gpkg
python vector-convert.py input.shp --info
python vector-convert.py input.shp --to geojson --crs EPSG:3857
python vector-convert.py input.geojson --to csv --precision 4
python vector-convert.py input.geojson --to csv --fields name,type,population
python vector-convert.py input.shp --to geojson --bbox -180 -90 180 90
pytest tests/ -v
MIT-0 (No Attribution)
矢量 GIS 格式转换工具,仅使用 Python 标准库,零外部依赖。
| 格式 | 扩展名 | 读 | 写 |
|---|---|---|---|
| Shapefile | .shp | 是 | 是 |
| GeoJSON | .geojson/.json | 是 | 是 |
| KML | .kml | 是 | 是 |
| GPX | .gpx | 是 | 是 |
| GeoPackage | .gpkg | 是 | 是 |
| CSV | .csv | 是 | 是 |
# 格式转换
python vector-convert.py input.shp --to geojson -o output.geojson
python vector-convert.py input.geojson --to shp -o output.shp
python vector-convert.py input.kml --to gpkg -o output.gpkg
# 查看文件信息
python vector-convert.py input.shp --info
# CRS 转换
python vector-convert.py input.shp --to geojson --crs EPSG:3857
# 坐标精度控制
python vector-convert.py input.geojson --to csv --precision 4
# 字段筛选
python vector-convert.py input.geojson --to csv --fields name,type,population
# 按边界框裁剪
python vector-convert.py input.shp --to geojson --bbox -180 -90 180 90