kml-geojson-converter

Use when asked to convert between KML and GeoJSON formats, or convert geo data for mapping applications.

⭐5stars🔀1forks📁View on GitHub🕐Updated Jan 11, 2026

When & Why to Use This Skill

This Claude skill provides a specialized utility for converting geographic data between KML and GeoJSON formats. It is designed to streamline workflows for GIS professionals and web developers, ensuring seamless data interchange between Google Earth, web mapping libraries like Leaflet and Mapbox, and various spatial data processing environments while preserving essential features and styles.

Use Cases

  • Web Mapping Integration: Convert KML files exported from Google Earth into GeoJSON format for seamless integration with modern web mapping frameworks like Leaflet, Mapbox, or OpenLayers.
  • GIS Data Interchange: Facilitate the transfer of spatial data between different GIS platforms and software by converting between industry-standard geographic formats while maintaining metadata and properties.
  • GPS Track Visualization: Transform GPS data and tracks stored in KML format into GeoJSON for easier manipulation, analysis, and display in custom web-based geographic applications.
  • Spatial Data Optimization: Simplify complex geographic polygons and reduce file sizes during the conversion process to improve the rendering performance of interactive maps.
namekml-geojson-converter
descriptionUse 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