K
kml-geojson-converter
About kml-geojson-converter
kml-geojson-converter converts geographic data between KML and GeoJSON for mapping, GIS, and spatial-data workflows. It also supports batch conversion, validation, and geometry simplification.
Key features
- 01Bidirectional KML and GeoJSON conversion
- 02Preservation of properties, styles, and descriptions
- 03Batch file conversion
- 04WGS84 and UTM coordinate systems
- 05Output validation and polygon simplification
Use cases
- 01Preparing data for web mapping
- 02Exchanging data between GIS tools
- 03Converting GPS tracks between formats
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ dkyazzentwatwa/ chatgpt-skills --skill kml-geojson-converterAfter installing, type/kml-geojson-converterin Claude Code to confirm it loaded.
Bundled filesscripts/kml_geojson_converter.pyscripts/requirements.txt
Details
From the project READMEKML/GeoJSON Converter
Convert geographic data between KML, GeoJSON, and other geo formats for mapping and GIS applications.
Purpose
Geo format conversion for:
- Google Maps / Earth integration
- Web mapping applications (Leaflet, Mapbox)
- GIS data interchange
- Spatial data processing
- GPS track conversion
Features
- Bidirectional Conversion: KML ↔ GeoJSON
- Feature Preservation: Maintain properties, styles, descriptions
- Batch Processing: Convert multiple files
- Coordinate Systems: WGS84, UTM support
- Validation: Verify output format validity
- Simplification: Reduce polygon complexity
Quick Start
from kml_geojson_converter import GeoConverter
# KML to GeoJSON
converter = GeoConverter()
converter.load_kml('input.kml')
converter.save_geojson('output.geojson')
# GeoJSON to KML
converter.load_geojson('input.geojson')
converter.save_kml('output.kml')
CLI Usage
# Convert KML to GeoJSON
python kml_geojson_converter.py input.kml --to geojson --output output.geojson
# Convert GeoJSON to KML
python kml_geojson_converter.py input.geojson --to kml --output output.kml
Comments
Markdown supported