kml-geojson-converter
Use when asked to convert between KML and GeoJSON formats, or convert geo data for mapping applications.
When & Why to Use This Skill
This Claude skill provides a robust solution for converting geographic data between KML and GeoJSON formats. It simplifies the workflow for GIS professionals and web developers by ensuring bidirectional conversion, feature preservation, and coordinate system support, making it essential for mapping integrations and spatial data processing.
Use Cases
- Google Maps & Earth Integration: Seamlessly convert GeoJSON datasets into KML files for visualization and layering within Google Earth and Google Maps.
- Web Mapping Development: Transform legacy KML data into GeoJSON format to power interactive web maps using libraries like Leaflet, Mapbox, or OpenLayers.
- GIS Data Interchange: Facilitate smooth data exchange between different GIS platforms by converting and validating spatial data structures.
- Spatial Data Optimization: Simplify complex polygons and reduce file sizes while maintaining essential geographic properties for efficient web performance.
| name | kml-geojson-converter |
|---|---|
| description | Use when asked to convert between KML and GeoJSON formats, or convert geo data for mapping applications. |
KML/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