I have a program that downloads and process GPX tracks from OpenStreetMap using: http://www.openstreetmap.org/traces/{ID}/data But how can I find the ID of the latest uploaded GPX file? Currently I get the ID from: http://www.openstreetmap.org/traces But that data is mostly meant to be read by humans, and needs a lot of parsing - is there a better way? asked 08 Sep '10, 07:15 Johnny Carlsen |
Well you can always use the rss feed, just extracting the link element with a regexp will work.
e.g
But compare that to parsing the html page there is almost no gain.
e.g.:
answered 10 Sep '10, 12:08 emj |
As the API doesn't seem to have a way of retrieving the newest GPX trace ID, here is an example of a shell command to grab the ID from the traces page:
But of course this might stop working in the future as the layout of the page may change. answered 08 Sep '10, 10:45 scai ♦ |
Your question is fine as it is, but it's very specific. If you can tell us more about what you're trying to do in general, there may be a way of acheiving it without having to scrape the traces page.