Install
openclaw skills install gpx-kml-visualizerThis skill should be used when the user wants to visualize GPS track routes from KML or GPX files. Trigger when the user mentions drawing, plotting, converting, or generating route maps, track visualizations, elevation profiles, or GIS maps from .kml, .gpx, or similar GPS track files. Also trigger for requests involving trail maps, running/cycling/hiking route charts, or generating JPG/HTML route planning diagrams from recorded GPS tracks.
openclaw skills install gpx-kml-visualizerConvert GPS track files (KML/GPX) into professional route visualization outputs:
Run the parsing script to extract coordinates and compute statistics:
python scripts/parse_track.py <input.kml|input.gpx> -o track_data.json
This produces a JSON file containing:
lat, lon, ele, cumulative dist)Choose output format based on user request:
Generate a printable/static route map image:
python scripts/plot_static.py track_data.json -o route_map.jpg --dpi 150
Output layout:
Generate a browser-based interactive map:
python scripts/plot_interactive.py track_data.json -o route_map.html
Features:
For quick generation, chain the scripts:
# Static JPG
python scripts/parse_track.py input.gpx -o track_data.json && python scripts/plot_static.py track_data.json -o route_map.jpg
# Interactive HTML
python scripts/parse_track.py input.gpx -o track_data.json && python scripts/plot_interactive.py track_data.json -o route_map.html
Required Python packages:
pip install matplotlib numpy folium Pillow
matplotlib: Static plotting and image generationnumpy: Numerical operations for statisticsfolium: Interactive Leaflet HTML map generationPillow: Image handling (usually installed with matplotlib)All scripts use only the Python standard library plus the above packages.
| Script | Purpose | Input | Output |
|---|---|---|---|
scripts/parse_track.py | Parse KML/GPX, compute stats | .kml or .gpx | track_data.json |
scripts/plot_static.py | Generate static JPG | track_data.json | .jpg image |
scripts/plot_interactive.py | Generate interactive HTML | track_data.json | .html page |
<coordinates> elements inside <LineString> (handles both KML 2.1 and 2.2 namespaces)<trkpt> elements with lat/lon attributes and <ele> child elements (GPX 1.1)For detailed format specifications, see references/formats.md.
--dpi 300) for print-quality output