My question is what happens with way_id, node_id as time goes? Are they always permanently bound to the real world entities they were first time assigned (some geographical object like a highway or river for ways and simple coordinate for nodes) or they could change their real world counterparts over time ? asked 02 Dec '19, 21:56 Stan Sokolov |
The IDs are not permanent. They can change for various reasons, e.g.:
Do not rely on IDs remaining constant. answered 02 Dec '19, 22:07 Frederik Ramm ♦ We are working on a routing framework that uses permanent route keys that contain entire path. In certain scenarios it was desired to repeat route exactly the same way without any modifications. We were using a way:node id sequence to encode route, however it seems to be not a legit option as those IDs are not permanent. Hmm very sad. Seems that our problem has no solution as coordinates of nodes could also be moved with map modifications. So there is no way to force a route go exactly the same path as was found suitable a certain time before.
(02 Dec '19, 23:11)
Stan Sokolov
Maybe it would work to store the coordinates directly? That way you know they aren't going to change.
(03 Dec '19, 00:37)
maxerickson
We have some additional metadata attached to OSM ways that we would like to append to the route each time someone uses it. If we store coordinates we will need to figure out which OSM way this coordinate lays on that is an expensive step for us. Ideally we would like to have a quick way to match route with OSM ways and get the metadata from the place we store it (Redis at this moment). Also as of now we only store OSM way:node id at places where route switches from one OSM way to another, skipping all the nodes in between. But if we store the coordinates we would need to store the entire path what will make us to transmit more data. Many downsides of this approach. Take example of a person who walks the same way from one place to another 2.5 miles every day and back just for some purpose (let say a servicemen). He also has a few alternative routes in case if they provide more service targets. We have the information stored in Redis that is updated every minute about service targets assigned to OSM ways/nodes and we would like quickly figure out which alternative route has more places for service. When we store ways:nodes we could easily match route against list of targets.
(03 Dec '19, 01:12)
Stan Sokolov
1
But as soon as someone splits a road (e.g. different sidewalks, max speed, a bus route that uses only part of the OSM-way), you will have to adapt your route and add the extra OSM way otherwise, you have a gap in your route
(03 Dec '19, 04:08)
escada
1
Look into Google polyline format.
(03 Dec '19, 06:31)
Richard ♦
|