You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently we expose a base 64 encoded version of the PhantomNode class in our API as hint property and accept them as hints array on each query. This is useful when connecting multiple services and ensuring consistent snapping. For example a user can first use the match service to obtain hints from a snapped route and then feed them into the trip service to optimize the route. Using coordinates here causes problems since snapping is ambiguous. Consider for example the coordinate for an intersection, it is not clear which of the connection segments should be used.
This introduces a number of problems since the engine::Hint object is part of our C++ API and depends on the PhantomNode which is an internal implementation detail. Furthermore the size of each hint is quite large increasing the response size significantly. To retain the possibility to connecting services we need a stable approach, possibly across datasets.
The most stable thing we have is OSM ids. A pair of OSM node ids identifies a segment uniquely. To capture the fact that a coordinate can be snapped to the middle of the segment, we would also need some sort of progression along the segment.
Proposal
We encode hint values as:
{start}:{target}:{progression}
Example
26753078:2712265859:0.5 would correspond to this coordinate.
Problems to solve
We need a way to go from OSM ids to internal node ids
We need a way to go from internal node id pairs to edge-based-node ids and segment offset long the compressed geometry
If we could save 2. in RAM it would enable us to also cut a lot of data from the StaticRTree.
The text was updated successfully, but these errors were encountered:
You can have multiple OSM ways between the same two nodes, e.g a way and a square sharing nodes as is the case here: http://www.openstreetmap.org/way/25822563. Would that be a problem?
Currently we expose a base 64 encoded version of the
PhantomNode
class in our API ashint
property and accept them ashints
array on each query. This is useful when connecting multiple services and ensuring consistent snapping. For example a user can first use thematch
service to obtain hints from a snapped route and then feed them into thetrip
service to optimize the route. Using coordinates here causes problems since snapping is ambiguous. Consider for example the coordinate for an intersection, it is not clear which of the connection segments should be used.This introduces a number of problems since the
engine::Hint
object is part of our C++ API and depends on thePhantomNode
which is an internal implementation detail. Furthermore the size of eachhint
is quite large increasing the response size significantly. To retain the possibility to connecting services we need a stable approach, possibly across datasets.The most stable thing we have is OSM ids. A pair of OSM node ids identifies a segment uniquely. To capture the fact that a coordinate can be snapped to the middle of the segment, we would also need some sort of progression along the segment.
Proposal
We encode hint values as:
{start}:{target}:{progression}
Example
26753078:2712265859:0.5
would correspond to this coordinate.Problems to solve
If we could save 2. in RAM it would enable us to also cut a lot of data from the StaticRTree.
The text was updated successfully, but these errors were encountered: