Read, edit and write geographic coordinate formats - GPX, KML, KMZ, GeoJSON and the GML geometry subset - over one point model, with geodesy, track statistics, simplification, geohashes and map tiles
[decks]
"@deckyard/geo" = "^0.1.0"| Version | Status | Kind | Pin | Requires | Engines | Capabilities |
|---|---|---|---|---|---|---|
| 0.1.0 | live | git | 99160057b00a | - | jennifer >=0.25.0 jennifer-tiny >=0.25.0 | - |
LGPL-3.0-only
0.1.0Times a client asked this registry where to find this deck. Not downloads: the registry only stores metadata, and the code is fetched from its repository directly, so we never see an install and cannot count one. Repeated builds inflate these numbers; installs from an existing lockfile do not appear at all. Counted in UTC.
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.25.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.
LGPL-3.0-only, see LICENSE. Copyright (C) 2026 mplx <[email protected]>.