1
votes

I need one way to know the direction of the roads when it’s tag as “oneway” type in OpenStreetMap.

The Linestrings data that include information about the roads have the tag “oneway”, but we don’t know in which direction. It’s true that also exists the tag “lane:forward” and “lane:backwards” that informs about the direction, but you just can find them in a very few cases.

So, how it works to make known and specify the directions you might take if you are driving from point A to point B? There’re many Routing websites with OSM Data… Do you need a special library, Routing engine or application to build correctly the changes of direction?

Thank you, Robert

1

1 Answers

1
votes

In OSM a way is an ordered list of nodes. This order implicitly defines the direction of the way. So for determining the direction of the way you just have to look at the nodes it references. It might also help to read the documentation for the OSM XML file format.