[openstreetmap-website] API: Enable output of elevation in GPS data (#682)

danstowell notifications at github.com
Sat Jan 18 13:40:09 UTC 2014


This Pull Request enables the API call `/api/0.6/trackpoints` to output the elevation ("ele") data associated with the GPS points it is returning. At present, it's possible to download individual (public) traces in order to get at the ele data, but this is much more awkward than the bulk API call and would not include trackpoints from semi-public traces.

The output conforms with GPX. All rake tests pass, on my machine.

There are a couple of potential counter-arguments to this modification. One is that GPS elevation data is not very accurate/helpful. I would argue that we have quite a large volume of GPS data, and the volume of GPS "ele" data likely makes it possible to perform very good analysis of means and outliers (as one already does with lat/lon data). It should be a rich source for [statistical analysis](http://mcld.co.uk/blog/blog.php?416). I am motivated here by the idea of using GPS elevations to check for issues in OSM "ele" node tagging.

Another possible counter-argument is that this increases the filesize of GPS query results, and so the bandwidth usage for that API call. I'm not in a position to judge the impact of that, but the change is small.

I hope this seems OK to you.
You can merge this Pull Request by running:

  git pull https://github.com/danstowell/openstreetmap-website api_gps_elevation

Or you can view, comment on it, or merge it online at:

  https://github.com/openstreetmap/openstreetmap-website/pull/682

-- Commit Summary --

  * API: Enable output of elevation in GPS data

-- File Changes --

    M app/models/tracepoint.rb (3)

-- Patch Links --

https://github.com/openstreetmap/openstreetmap-website/pull/682.patch
https://github.com/openstreetmap/openstreetmap-website/pull/682.diff

---
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/682
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20140118/cf2d9c3a/attachment.html>


More information about the rails-dev mailing list