Skip to content

Overlap detection does not account for one polygon containing another #1455

@matthew-white

Description

@matthew-white

This issue captures a case discussed in #1152.

@srujner wrote at #1152 (comment):

I had feelings during testing, that sometimes I wasn't sure what exactly to click on to get the list of submissions, especially when it came to shapes.
The great example is here: https://test.getodk.cloud/projects/659/forms/model_bounding_boxes/submissions?map=true
Select the cluster with number 5 (Deutschland territory) and then select the cluster with number 2 (Villa Buhler park).
It is not intuitive enough for me where to click to get the list of submissions and I would prefer to have a list each time the 2 or more submissions are near enough, because selecting a correct pin is easier to do from the list then from lets say ~100 pins on the map.
In this case I can click on various areas and have different results each time.

I wrote at #1152 (comment):

Ah I think I know what's going on there, that's definitely an interesting case. The way the overlap detection works currently is that it's looking for places where two features intersect or nearly intersect. So if a point [vertex] on one polygon is within 10 pixels of a point [vertex] on another polygon, and you click either point, then a popup will be shown listing both polygons. That happens in the example above if you click near where the two polygons touch.

However, I'd say that the overlap detection breaks down if one polygon is fully contained within another polygon, and the smaller/contained polygon doesn't have any points near the points of the larger/containing polygon. I think that's why when you click in the middle of the two polygons in the example above, only one polygon is selected (there's no list). The polygon that gets selected is the larger polygon. I think it's probably even possible if set up correctly that the smaller/contained polygon would be fully unselectable.

Metadata

Metadata

Assignees

Labels

behavior verifiedBehavior has been manually verifiedfrontendRequires a change to the UI

Type

Projects

Status

✅ done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions