2

I'm working with road segments as LineStrings in GeoPandas, for each segment I would like to determine the direction of travel (they drive on the right).

This information is not encoded, how can I determine it?

I was thinking to query OpenStreetMap, since when I overlay in QGIS I can see this has travel direction information.

Can you think of any other approaches, or guide me in querying OpenStreetMap?

enter image description here

0

There is no direct OSM query for determining traffic direction.

You have to look at the raw data, i.e. the nodes of each way and specifically the order in which these nodes are referenced. This order defines the direction of the way.

However all ways are bidirectional per default unless there is a oneway tag present. The only exceptions are ways tagged as highway=motorway or junction=roundabout in which cases oneway=yes is implied.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.