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
When using a rather small block_area this blocks only one of the directions as the ID search stops when going outside of the boundary and just adds one edgeId. We could either make the current 1km² setting changable or properly find all edgeIds in this bounding box.
The shape method has additionally the disadvantage that if the junction nodes are outside of the bounding box (but the edge is still crossing the bbox that happens frequently with motorways or tunnels) the edge is not skipped. But fetching the edge geometry could be too expensive.
Another issue for motorways could be that we use BFS to find "all" edges in a shape. If there is no connection from one edge to another in the shape, our current approach might fail.
At the time of creating the block feature, we haven't had the findNClosest method in the LocationIndexTree. Maybe we could use this method in combination with an EdgeFilter that filters Edges that lie outside of the shape?
This should block via edge ids and this route via shape but both do not work at the moment.
This route is properly blocked where the edge id search is ok or this route that includes the tower node in the block_area.
TODO: I'm unsure why this route fails even for the opposite direction as the edge id search should find at least one of the two edges.
If there is no connection from one edge to another in the shape, our current approach might fail.
Yes, that was what I meant :)
Maybe we could use this method in combination with an EdgeFilter that filters Edges that lie outside of the shape?
How do we detect if an edge is outside of a shape? If one or two tower nodes are outside of the shape then the edge could be still inside and if we fetch the whole geometry we have to take care of the performance. Maybe a good compromise is: if the shape is small then call fetchWayGeometry and if the shape is big then assume there will be at least one tower node of every edge inside the shape and use the shape contains method. And we do a performance comparison in a city (as it is an edge-dense area) which area size should be used as new default.
Thanks for the examples will take a closer look :).
Maybe a good compromise is: if the shape is small then call fetchWayGeometry and if the shape is big then assume there will be at least one tower node of every edge inside the shape and use the shape contains method. And we do a performance comparison in a city (as it is an edge-dense area) which area size should be used as new default.
How about, if the road is longer than half the shape length, then we fetch the geometry (or something like this)?
There are currently 3 very similar things in GH but handled completely different with their own limitations and especially the block_area has this bug and #1127 so it might be interesting to think about this again:
spatial rules creates an index before import to handle country specific speeds and access properties (also polygons are supported but resolution is per default not too fine). This is not possible to specify per request, nor is it flexible as the speed and access rules are defined in Java. Furthermore the polygons should not overlap and if we return one, which makes sense as used for country borders but for other use cases we would like to return multiple (e.g. one for every vehicle profile).
the ChangeGraphHelper uses a JSON from a request to change speeds and access properties (bbox, line, multiple points). More flexible but also rather static as the changes are permanent.
this block_area parameter changes access properties (currently only bbox, point and circle). Less flexible (just access) but per request.
Activity
make size to use shape vs. edgeId configurable, improves #1214
boldtrn commentedon Nov 8, 2017
Could you add an example?
Another issue for motorways could be that we use BFS to find "all" edges in a shape. If there is no connection from one edge to another in the shape, our current approach might fail.
At the time of creating the block feature, we haven't had the
findNClosestmethod in theLocationIndexTree. Maybe we could use this method in combination with an EdgeFilter that filters Edges that lie outside of the shape?karussell commentedon Nov 9, 2017
Yeah, an example is important :)
This should block via edge ids and this route via shape but both do not work at the moment.
This route is properly blocked where the edge id search is ok or this route that includes the tower node in the block_area.
TODO: I'm unsure why this route fails even for the opposite direction as the edge id search should find at least one of the two edges.
Yes, that was what I meant :)
How do we detect if an edge is outside of a shape? If one or two tower nodes are outside of the shape then the edge could be still inside and if we fetch the whole geometry we have to take care of the performance. Maybe a good compromise is: if the shape is small then call fetchWayGeometry and if the shape is big then assume there will be at least one tower node of every edge inside the shape and use the shape contains method. And we do a performance comparison in a city (as it is an edge-dense area) which area size should be used as new default.
boldtrn commentedon Nov 9, 2017
Thanks for the examples will take a closer look :).
How about, if the road is longer than half the shape length, then we fetch the geometry (or something like this)?
karussell commentedon Nov 9, 2017
We have to see if distance calculation is really faster then fetching the full way geometry ;)
Use Policeman Tools to find locale related issue
karussell commentedon Feb 3, 2018
There are currently 3 very similar things in GH but handled completely different with their own limitations and especially the block_area has this bug and #1127 so it might be interesting to think about this again:
block_areaparameter changes access properties (currently only bbox, point and circle). Less flexible (just access) but per request.karussell commentedon Mar 31, 2018
Closing in favor of #1324 and #1280