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
{{ message }}
Repository navigation
Unify bulk customization of graph properties like speed and access #1280
See my comment here, ie. we have three approaches:
spatial rules: requires to build an index up front and is best used via iterating through all edges. So usage will be mostly on import time
change graph API: currently does not support polygons and should be used for rather small areas only like for a construction or longer traffic jam we removed this with Remove /change graph endpoint #1931
the CustomWeighting approach allows changing the max_speed, priority and speed_factor for certain areas. Is used per-request and for import.
They fulfill different use cases: on import and temporary per API request. (There was a third: permanent per API-request but this was removed in #1931).
And so the approaches are different: 1. build an index before looping through all edges, 2. loop through a geographically limited set of edges to collect the edge IDs or 3. consider the changed properties only while doing the Dijkstra (geometry.contains at runtime)
changed the title [-]Unify builk customization of graph properties like speed and access[/-][+]Unify bulk customization of graph properties like speed and access[/+]on Feb 3, 2018
Change graph and block area both use the GraphEdgeIdFinder. So the core logic seems to be the same. Maybe these two could become more similar by passing an encoded json into the block area?
The spatial rules have to exist before the edge is created, therefore it cannot use the GraphEdgeIdFinder. I am not sure how we could merge the logic? It might be possible to create a "ChangeGraphSpatialRuleIndex". Then we wouldn't have to update the edges anymore, but could check the properties in the Weighting. Therefore changes would be faster, but routing would be slower.
Activity
[-]Unify builk customization of graph properties like speed and access[/-][+]Unify bulk customization of graph properties like speed and access[/+]boldtrn commentedon Feb 13, 2018
How do you propose to unify the code?
Change graph and block area both use the
GraphEdgeIdFinder. So the core logic seems to be the same. Maybe these two could become more similar by passing an encoded json into the block area?The spatial rules have to exist before the edge is created, therefore it cannot use the GraphEdgeIdFinder. I am not sure how we could merge the logic? It might be possible to create a "ChangeGraphSpatialRuleIndex". Then we wouldn't have to update the edges anymore, but could check the properties in the Weighting. Therefore changes would be faster, but routing would be slower.
karussell commentedon Mar 27, 2023
Mostly done. Requires probably further clarification regarding spatial rules but this would be a different issue.