Skip to content

booleanPointInPolygon possible false negative with an overlapping MultiPolygon #3050

Description

@smallsaucepan

booleanPointInPolygon can possibly return a false negative under certain circumstances. It effectively returns early without considering the point might yet be in one of the other polygon geometries.

From @Pitouli 's comments on PR #2821:

Fix edge case

If the point was on the edge of a polygon, the function was returning immediately "true" if the option ignoreBoundary was false, and false otherwise.

But the RFC does not say that polygons inside a multipolygon cannot overlap, it only says a multipolygon is an array of polygons.
https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.7

So in case the point is on the border of one of the polygon and ignoreBoundary is true, the loop should continue to see if the point is inside an another polygon.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions