I want to get Road/Lane edges data (Lat/Long/Alt) from the Open Street Map so, that I can overlay rendered edges on a video overlay. I have video overlay working fine but I just need coordinates of road/Lane edges from OSM.

How should I go about it ?

Up until now, I have used OSMIUM (http://osmcode.org/libosmium/manual.html) to import PBF file into my C++ program, I can see tags like "Highway" but they contain Lat/Long of an arbitrary point on the road AND I need is coordinates of the edges.

Can anyone point me in the right direction ?

Thanks in advance.

asked 14 Jun '17, 19:48

NitinH's gravatar image

NitinH
4113
accept rate: 0%


OSM generally maps linear features such as roads by a single line ideally located on the centre line of the feature. OSM does not, in general, store altitude data. There is a method of mapping highways as areas but it is not yet widely used (partly because it makes mapping things more difficult, but mainly because areas are not necessary for many use-cases). Equally the width tag is not widely used with highways.

To achieve what you want you will need to:

  • Define areas for highways. In practice simple rules of thumb and a standard buffering of linestrings gives perfectly reasonable results. (For instance a typical residential street will be 5-6 m across, so buffer values of 2.5 to 4 m should be sensible).
  • Use an external source for elevation data. Most people use SRTM data from NASA.
permanent link

answered 14 Jun '17, 20:01

SK53's gravatar image

SK53 ♦
22.2k46228348
accept rate: 19%

4

Where available, the road width might be also estimated from the lanes tag.

(15 Jun '17, 08:56) Piskvor
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:

×263
×128
×46
×42
×16

question asked: 14 Jun '17, 19:48

question was seen: 1,443 times

last updated: 15 Jun '17, 08:56

powered by OSQA