Open fbanning opened 2 years ago
The w.nodes
are in order (as they appear in the original .osm data), so you can just access the start and end of the way using w.nodes[1]
and w.node[end]
I think it's not quite as straight forward as that for determining the start and end though.
For a two-way way then yes you can just take the order of way.nodes and the reverse order to get the two lists of nodes. For a one-way there I think you need to check a tag to know which is the start - sorry I'm away from the computer so can't check this at the moment.
Perhaps we could provide an API for getting the start and end mode of a one way way?
Say I want to look at a specific
w::Way{Int64}
. I can accessw.nodes
and get a vector of nodes that the way is made up of. I wonder if there is a way to identify the start and end node of a givenWay{Int64}
?