Ad

togeojson: KML/GPX to GeoJSON converter

Convert KML and GPX files to GeoJSON format, enabling easy integration with mapping libraries. This library supports various KML and GPX features, providing a concise and efficient conversion process.
Screenshot of mapbox/togeojson homepage

togeojson converts KML and GPX files into GeoJSON format, facilitating their use in modern mapping applications. It handles common KML and GPX elements like points, lines, polygons, and tracks. The library leverages XML DOM parsing to process these files and generates compliant GeoJSON output, compatible with various JavaScript mapping libraries.

The project is notable for its simplicity and focus on core KML and GPX features. It provides both browser-based and Node.js implementations, offering flexibility in deployment. Its design prioritizes robustness, aiming to handle a wide range of valid KML and GPX files without crashing, while clearly documenting limitations regarding unsupported features like NetworkLinks.

  • KML/GPX Support: Converts various KML and GPX features, including points, lines, polygons, and tracks.
  • Multiple Platforms: Supports browser-based usage via JavaScript and Node.js for server-side processing.
  • Simple API: Offers straightforward functions for converting KML and GPX data into GeoJSON objects.
  • Style Handling: Processes KML styles, providing support for hashing to ensure consistent GeoJSON output.
  • Extensive Feature Coverage: Supports a broad range of KML and GPX features while clearly defining limitations.
  • Error Handling: Designed to handle various KML and GPX constructs gracefully, without crashing on invalid files.
  • Clear Documentation: Includes comprehensive documentation detailing API usage, supported features, and known limitations.

The project is actively maintained, with recent commits indicating ongoing development and support for new features. A stable release badge and a FOSSA status highlight a commitment to reliability. The documentation is relatively complete, covering various aspects of usage. The project has a significant number of stars and forks, suggesting a degree of community adoption.

This project is valuable for developers seeking to integrate KML and GPX data into web mapping applications. It simplifies the conversion process, offering a reliable and straightforward solution. By abstracting the conversion logic, it enables developers to leverage GeoJSON with libraries like Leaflet and Mapbox, improving efficiency and streamlining workflow.

Summarize:
Share:
Stars
1,321
Forks
322
Issues
30
Created
13 years ago
Commit
2 months ago
License
BSD-2-CLAUSE
Archived
No
Updated 1 month ago

Similar Repositories