kml-geojson-converter
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseKML/GeoJSON Converter
KML/GeoJSON 转换器
Convert geographic data between KML, GeoJSON, and other geo formats for mapping and GIS applications.
在KML、GeoJSON及其他地理格式之间转换地理数据,适用于地图和GIS应用。
Purpose
用途
Geo format conversion for:
- Google Maps / Earth integration
- Web mapping applications (Leaflet, Mapbox)
- GIS data interchange
- Spatial data processing
- GPS track conversion
地理格式转换适用于:
- Google Maps / Earth 集成
- Web地图应用(Leaflet、Mapbox)
- GIS数据交换
- 空间数据处理
- GPS轨迹转换
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
- 双向转换:KML ↔ GeoJSON
- 特性保留:保留属性、样式、描述信息
- 批量处理:转换多个文件
- 坐标系支持:支持WGS84、UTM
- 有效性验证:验证输出格式的有效性
- 简化处理:降低多边形复杂度
Quick Start
快速开始
python
from kml_geojson_converter import GeoConverterpython
from kml_geojson_converter import GeoConverterKML to GeoJSON
KML to GeoJSON
converter = GeoConverter()
converter.load_kml('input.kml')
converter.save_geojson('output.geojson')
converter = GeoConverter()
converter.load_kml('input.kml')
converter.save_geojson('output.geojson')
GeoJSON to KML
GeoJSON to KML
converter.load_geojson('input.geojson')
converter.save_kml('output.kml')
undefinedconverter.load_geojson('input.geojson')
converter.save_kml('output.kml')
undefinedCLI Usage
CLI 使用
bash
undefinedbash
undefinedConvert KML to GeoJSON
Convert KML to GeoJSON
python kml_geojson_converter.py input.kml --to geojson --output output.geojson
python kml_geojson_converter.py input.kml --to geojson --output output.geojson
Convert GeoJSON to KML
Convert GeoJSON to KML
python kml_geojson_converter.py input.geojson --to kml --output output.kml
undefinedpython kml_geojson_converter.py input.geojson --to kml --output output.kml
undefined