Featured image of post GPX to GeoJson convert tool

GPX to GeoJson convert tool

I hacked a C++ tool for converting GPX files to GeoJson, because the only one I could find used node.js. Nothing against it, but it seems to be very much overkill for a simple conversion tool. My tool is available on GitHub. Binaries are available for GNU/Linux, the tool should be compatible with MacOS and Windows (not tested).

Runtime comparison with togeojson (Node.js)

$ time togeojson iceland-landmannalaugar-porsmork.gpx >/dev/null
real	0m0.563s
user	0m0.680s
sys	0m0.032s

And now with my tool

$ time geoJson iceland-landmannalaugar-porsmork.gpx >/dev/null
real	0m0.040s
user	0m0.024s
sys	0m0.012s

Yeah, kind of what I expected.

It’s hacky, I wrote in in about an hour, but it does the job for my purposes and I want to share it in case someone else finds it useful.

Licensed under CC BY-NC-SA 4.0