Skip to content

Point hint is not working as expected for curved roads #2319

Closed

Description

@easbar

Doing a location lookup for the blue marker on the picture with point_hint=Doubtfire should clearly snap to Doubtfire Crescent, because it is quite close to the marker and it matches the point_hint. However, currently it snaps to Denison Street.

image

The reason is that here:

BBox bbox = GHUtility.createBBox(iter);
if (!pointCircle.intersects(bbox)) {
return false;
}

we only accept edges for which the bounding lies within a circle around the query point (we use 100m radius currently). The problem is that in GHUtility#createBBox(iter) we only consider the tower nodes to calculate the bounding box. Since the road is curved (it has a u-like shape) this is very different to the bounding box we would obtain if we took into account the entire road geometry (pillar nodes). See the boxes of Doubtfire Crescent and Denison Street in the screenshot.

Activity

  1. easbar commented on May 14, 2021

    @easbar
    MemberAuthor

    This problem already existed in 2.x

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