GPX to TopoJSON Converter
Render a GPS track on a D3-geo chart with the smallest possible payload — the typical step before a Strava-style heatmap web visualisation.
Common issues converting GPX to TopoJSON
- TopoJSON arc-sharing works best when multiple tracks overlap on shared roads or paths. Isolated GPS tracks get only modest compression vs plain GeoJSON.
- Quantization at default 1e4 rounds coordinates to roughly 11m precision at the equator — fine for visualisation, but lossy for analysis. Set higher quantization or skip it if you need raw precision.
- Per-point GPS extensions (elevation, heart rate, cadence) are dropped. Track-level properties (<name>, <desc>) carry over as feature properties.
- Output is a single .topojson file with one objects entry per source track or waypoint cluster.
Frequently asked questions
Can I render this directly with d3-geo?
Yes. `topojson.feature(topology, topology.objects.tracks)` returns a GeoJSON FeatureCollection that d3.geoPath() consumes.
How does file size compare to GeoJSON?
Typically 30–60% smaller for a multi-track GPX with arc-sharing. For a single isolated track, expect 10–20% savings from quantization alone.
Are waypoints and tracks in the same output?
Yes — each source GPX type (waypoint, route, track) becomes its own named object inside the topology.
Will it work with Observable?
Yes — Observable's `import {feature} from 'topojson-client'` is the standard pattern. The output is fully compliant with TopoJSON 3.x.