A Jennifer deck that reads, edits and writes GPX,
KML, KMZ, GeoJSON and the GML geometry subset through one Document type, so a
conversion is a read and a write. It also measures: great-circle distances and
bearings, track statistics, simplification, point-in-polygon tests, geohashes
and Web Mercator map tiles.
jvc add @deckyard/geoOr unpack src/ from a release archive (deckyard-geo-<version>.tar.gz) into
vendor/deckyard/geo/.
Requires Jennifer 0.28.0 or newer. The deck declares no capabilities, so it
runs on jennifer-tiny; only open, save and their per-format siblings
touch the disk.
use io;
import "@deckyard/geo/" as geo;
def doc as geo.Document init geo.open("hike.gpx");
def km as float init geo.trackDistance($doc.tracks[0]) / 1000.0;
io.printf("%s: %f|prec=1 km\n", geo.describe($doc), $km);
geo.save($doc, "hike.kml");
geo.convertFile("hike.gpx", "hike.geojson");
Coordinates are WGS 84 degrees and are never reprojected: a document in a
projected system (a national grid, a UTM zone) is rejected, not misread. GPX
<extensions>, KML styles and timestamps, and polygon holes are not carried
(GML reads a hole as a track of its own), and there is no TCX, FIT or NMEA.
Formats lists what
each conversion loses.
deckyard.github.io/deck-geo, with the
full API in the
cheatsheet.
Runnable programs are in examples/. tools/check-all.sh runs the
CI gate.
Google Earth™ and Google Maps™ are trademarks of Google LLC. Bing™ is a trademark of Microsoft Corporation. OpenStreetMap™ is a trademark of the OpenStreetMap Foundation. Garmin™ is a trademark of Garmin Ltd. or its subsidiaries. Other product and company names may be trademarks of their respective owners. They are used only to identify the products whose formats and tile schemes this deck works with. This deck is an independent project, not affiliated with, sponsored or endorsed by any of them.
LGPL-3.0-only, see LICENSE. Copyright (C) 2026 mplx <mplx@jennifer-lang.dev>.