Mass-downloading GPX tracks from the OpenStreetMap site
Posted by Ævar Arnfjörð Bjarmason on 14 April 2009 in English.A while ago there was a thread on talk-is (partially in English) about creating a party render with all the GPX tracks recorded in the Greater Reykjavík region in Iceland.
To that end I wrote a tool to download all the GPX tracks a given user has created by screen-scraping the OSM site, this can be used along with the Planet dump extracts to get (approximately) all the GPX tracks for every user that contributed to a given .osm file.
In the case of Iceland that resulted in 1.4 GB of GPX tracks, which were further extracted to create a party render of the capital region.
After writing this tool I'm mostly using it to make sure I've uploaded all my GPX traces to the OSM server, I keep my GPX traces in a Git repository and sometimes I've forgotten to upload them, but no more!:
$ perl get-osm-gpx-tracks-for-user --debug --download --out-dir=tmp "Ævar Arnfjörð Bjarmason"
$ perl diff-gpx-directories ~/src/gps/gpx tmp/
== Files in `/home/avar/src/gps/script/tmp' not in `/home/avar/src/gps/gpx':
== Files in `/home/avar/src/gps/gpx' not in `/home/avar/src/gps/script/tmp':
2008-12-20-Protesting-at-Austurvollur-photomapping-at-laugarvegur-and-biking-down-saebraut.gpx
2009-01-25-Bus-to-Althingi-and-walking-about-in-Althingisgardurinn.gpx
2009-03-25-Walking-in-Ellidardalur.gpx
2009-04-09-2009-04-10-Driving-from-Akranes-to-Akureyri-via-Egillstadir.gpx
Well, almost.
Discussion