I intend to extract Elevation from GPS tracks available in OSM

I´m trying to create a Digital Terrain Model for Brasil. Publicly available sources are inadequate (SRTM has only 90m resolution (30m only for the US), ASTER has many artifacts, etc). So I intend to use crowsourced data from peoples GPSs and smartphones and do the patchwork myself.

I understand (from the links bellow) that OSM does not contain elevation data, and that elevation is not compatible with the data structure. Also that vertical precision (elevation) from GPSs is not very good (1.5 times horizontal precision, correct ? )

Some years GPS devices have barometers included. Since about 2012 higher end android smartphones also feature that. Is it possible to distinguish, in the GPS track "GPS elevation" from "barometer/altimeter" elevation?

regards Lucas

https://help.openstreetmap.org/questions/999/how-to-extract-elevation-information-from-tracks-in-josm

asked 22 Jan '14, 13:20

LucasMation's gravatar image

LucasMation
26113
accept rate: 0%

edited 22 Jan '14, 14:54

2

It's worth looking at what Dan Stowell did using Gaussian processes with tagged ele=* values in the UK: http://www.mcld.co.uk/blog/

(22 Jan '14, 14:37) SK53 ♦

I see here 2 questions mixed and will try to answer them one by one

  1. GPS traces of OSM
    They are available but contain only point cloud for privacy reasons: http://wiki.openstreetmap.org/wiki/Planet.gpx
    Indeed you can crawl via the OSM API and scan and find if users have published raw traces in GPX format that might contain also ALT data. For example, I have some public traces: https://www.openstreetmap.org/user/!i!/traces/1112661

  2. DGM trough GPS 3D data
    This is pretty hard for crowdsourcing as you say there are various different aspects that influence the quality. AFAIK neither GPX nor NMEA contain information about the Z-quality, but call me wrong.
    But there are some approaches to work on that topic as http://opendem.info which seems now to put a focus esp. in barometric recordings (subsea height). Also OSM2World has some approaches to make use of OSM tagged height informations to improve the DEM shape locally, but AFAIK this is still WIP and not pushed in the mainline client.

permanent link

answered 22 Jan '14, 13:55

iii's gravatar image

iii
4.9k63780
accept rate: 11%

thank you:

1)I agree. From your comment and the discussion above, it seems that it would be necessary to get the full Tracks and even some data from the html page with the link (to calibrate error as user fixed effects). I´m not a web programmer. Has anyone implemented such a crawler? Could I do that with "wget"? what would be the baseline url?

2) yes. But I imagine that some sort of statistical model can help solve, smooth the data, as indicated in the post above, (http://www.mcld.co.uk/blog/)

(22 Jan '14, 15:56) LucasMation

to 1.) You can use e.g. scrapy to realize such an crawler easily. Please respect the terms of service and setup your service to do a min load. You might also consider to contact the OSMF data working group maybe they can help you to get the GPX.

to 2.) I can just suggest recommend to talk to the 3D folks as this is in general interest :)

(22 Jan '14, 16:59) iii

While you may find some devices where it is possible, I don't think you'll be able to see the physical data source in the generated gpx file.

For example on my altimeter-enhanced GPSMap62s, the altimeter and the gps are used as an aggregated sensor (one measure refining the other) and the output is a single value. There isn't even a UI to get the individual measurements. Same is true of combined GPS/GLONASS receivers : you get an enhanced but aggregate measurement.

That said, more and more devices store a DOP value in the gpx file. As long as it isn't stripped when uploaded to OSM, you can use that value as a (weak) hint of the measurement accuracy.

permanent link

answered 22 Jan '14, 13:40

Vincent%20de%20Phily's gravatar image

Vincent de P... ♦
17.0k16147244
accept rate: 19%

1

If you want an example of a GPS trace in OSM with elavations from a barometric altimeter, there's one here, from a Garmin eTrex Vista HCx. Nothing in there shouts out to me "these elevations are via a barometric altimeter". If you look at the numbers you'll see another problem - despite being calibrated to think that it was at 8m a couple of times during the day (the area of the trace is extremely flat) the recorded elevation drifted down consistently during the day.

(22 Jan '14, 14:15) SomeoneElse ♦

Interesting. Does the data contain metadata (or some field) on the device manufacturer and model? Maybe knowing this I could map which devices use barometer. What do you think?

Bare in mind that the alternative is using SRTM satellite data, with 90m pixel, and vertical accuracy of 7-14m for 1sd (68%) or +o-45m if you want a 99% confidence interval

(22 Jan '14, 14:40) LucasMation

You'd need to compare the contents of a public trace from a non-barometric altimeter eTrex with the one that I linked to. Maybe ask in #osm on IRC to see if anyone can quickly point to one?

(22 Jan '14, 16:09) SomeoneElse ♦

Update and further questions:

1)Following the suggestions above, I built the web scrapper (programmed it in Stata a statistical package whose programming language I´m familiar with). It works like this:

a)run a loop through every "menu pape" (like this page: http://www.openstreetmap.org/traces/page/1) parsing the HTML to extract information (url, contributor name and date) of each fo the 20 tracks per page. There are about 47000 menu pages. Joining the info on all "menu pages" I have a list of the URLs for each track (like this: http://www.openstreetmap.org/user/kwiky/traces/1651084) and also the URL to download the file.

b) For each track in the list created above, visit the specific ulr and extract the initial coordinate.

c) If that coordinate falls within Brazil, download the data.

I think I got it to work, but OSM server seems to be cutting me off "a)", after about 500 or so "menu pages" scrapped. Does any one know what is happening? I tried slowing the process down, making the computer stop for 2 seconds after scrapping every page but that did not work either.

2) I just googled again now and found this post: http://blog.osmfoundation.org/2013/04/12/bulk-gpx-track-data/ claiming that you can get the full gpx files, available from here: http://planet.osm.org/gps/ has anyone used this data? Also, is it available/duplicated elsewhere for download? The file is 21GB and the download is super slow (my connection here is pretty fast). It computer is predictin it will take 17 days to download.

again, any help on this would be appreciated.

permanent link

answered 03 Feb '14, 17:43

LucasMation's gravatar image

LucasMation
26113
accept rate: 0%

you should use the "edit" link below your question and add the text there. This is no discusion forum here. Maybe that would be the better way anyway...

(03 Feb '14, 18:20) aseerel4c26 ♦

Re "getting cut off" I'd be tempted to ask on IRC in #osm-dev. Re the usefulness or otherwise of http://planet.osm.org/gps/, this page suggests it's just lat and long, so probably not helpful to you.

(03 Feb '14, 19:22) SomeoneElse ♦

Yep, see link in my post, this is just a simple 2D pointcloud

(04 Feb '14, 09:19) iii
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×205
×24
×22
×6
×4

question asked: 22 Jan '14, 13:20

question was seen: 17,017 times

last updated: 04 Feb '14, 09:19

powered by OSQA