wnd's weblog

Convert GPX files to KML

22 Sep 2019 23:52:00 software

Convert GPX files to KML with this command line tool. Reads files and stdin. Not without its flaws. \o/

I’ve been using a Ruby script for the job to ages. The old version reads an entire GPX file as a DOM. As a consequence it doesn’t stream, and it may allocate a lot of memory at once. Also, it doesn’t perform all that great.

With newly discovered Golang, my love towards low(er)-level languages, and desire for performance improvement, I decided to do a rewrite. Here’s the initial result. This Golang version can stream input, and in my test case transforms files eight times as fast as the Ruby version (with 2.6).