Skip to content

Blocking motorways fails #1214

Closed
Closed

Description

@karussell

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.

Activity

  1. boldtrn commented on Nov 8, 2017

    @boldtrn
    Member

    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 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?

  2. karussell commented on Nov 9, 2017

    @karussell
    MemberAuthor

    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.

    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.

  3. boldtrn commented on Nov 9, 2017

    @boldtrn
    Member

    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)?

  4. karussell commented on Nov 9, 2017

    @karussell
    MemberAuthor

    We have to see if distance calculation is really faster then fetching the full way geometry ;)

  5. karussell commented on Feb 3, 2018

    @karussell
    MemberAuthor

    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.
  6. karussell commented on Mar 31, 2018

    @karussell
    MemberAuthor

    Closing in favor of #1324 and #1280

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions