I'm displaying GPX traces on a Leaflet map. I'm using TopoJSON to drastically reduce file size, which works pretty well.
My problem is the following : I want to be able to display altitude and timestamp for each point of the trace. In order to do that, I need the TopoJSON cli to keep ALL of the original coordinates, to match their indexes with indexes of the timestamps array.
But so far I'm unable to do that. On my GPX file converted to GeoJSON, I got 4062 coordinates, and the GeoJSON file converted to TopoJSON has one arc with 3913 vertices.
Using this :
togeojson trace.gpx | topojson --no-quantization -p > trace.topojson
bounds: -18.033666 27.732765 -17.981946 27.772151 (spherical) topology: 2 arcs, 3915 points prune: retained 2 / 2 arcs (100%)
So, is it possible to keep the same amount of points, so that I could map precisely coordinates in the TopoJSON file and timestamps?