{"id":6456,"library":"simplekml","title":"Simple KML Creator","description":"simplekml is a Python package designed for generating KML (Keyhole Markup Language) and KMZ files with minimal effort. It simplifies the creation of KML documents, folders, points, linestrings, and polygons without requiring in-depth knowledge of the KML standard itself. The current version is 1.3.6. Release cadence is infrequent, with the last update in 2021, and prior updates in 2020 and 2018.","status":"active","version":"1.3.6","language":"en","source_language":"en","source_url":"https://github.com/eisoldt/simplekml","tags":["KML","KMZ","GIS","geospatial","map","vector graphics"],"install":[{"cmd":"pip install simplekml","lang":"bash","label":"Install stable release"}],"dependencies":[],"imports":[{"symbol":"Kml","correct":"from simplekml import Kml"},{"symbol":"simplekml","correct":"import simplekml"}],"quickstart":{"code":"import simplekml\n\nkml = simplekml.Kml()\nkml.newpoint(name=\"Kirstenbosch\", coords=[(18.432314, -33.988862)]) # Longitude, Latitude, optional height\nkml.save(\"botanicalgarden.kml\")\n","lang":"python","description":"This example demonstrates how to create a basic KML file with a single point named 'Kirstenbosch' at specified coordinates and save it to a file."},"warnings":[{"fix":"Always provide coordinates as `(longitude, latitude, ...)` tuples or lists, e.g., `coords=[(lon, lat)]`.","message":"Coordinates order: simplekml expects coordinates in (longitude, latitude, optional height) order. This is a common source of error as many other GIS contexts use (latitude, longitude).","severity":"gotcha","affected_versions":"All versions"},{"fix":"If targeting Google Maps for Android, thoroughly test KML output with complex polygons. For critical applications, manual post-processing of the KML or alternative rendering libraries might be necessary. This is an open issue with simplekml.","message":"Polygons with multiple inner boundaries may not render correctly in Google Maps for Android. While Google Earth is more forgiving, Google Maps for Android (especially with older SDK utility libraries) may require multiple `<innerBoundaryIs>` tags, each with a single `<LinearRing>`, rather than simplekml's output of multiple `LinearRing` elements within a single `<innerBoundaryIs>` tag.","severity":"gotcha","affected_versions":"All versions, particularly when targeting Google Maps for Android."},{"fix":"For basic tracks, use `simplekml.LineString`. For rich GPS track features including timestamps, use a dedicated GPX library (e.g., `gpxpy`) or convert data to GPX.","message":"For complex GPS track data (e.g., time-series points), KML is not the most suitable format, and simplekml does not directly support advanced KML extensions like `gx:Track`. Consider using the GPX format and a library like `gpxpy` for such use cases, as GPX is better designed for tracks.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-15T00:00:00.000Z","next_check":"2026-07-14T00:00:00.000Z"}