Skip to content

Conversation

@rexxars
Copy link

@rexxars rexxars commented Feb 11, 2026

(Lifted from #3010)

Fixes behavior of booleanContains to return true if every point in a MultiPoint is inside/on boundary of some polygon, and at least one is strictly interior. This previously returned false, but differs from booleanWithin and doesn't match DE-9IM semantics. In my eyes this is a bugfix, not a breaking change - but will leave it to the maintainers to decide how to classify it.

An example:

Given the following square polygon:

{
  "type": "Polygon",
  "coordinates": [
    [
      [0, 0],
      [1, 0],
      [1, 1],
      [0, 1],
      [0, 0]
    ]
  ]
}

And the following MultiPoint:

{
  "type": "MultiPoint",
  "coordinates": [
    [0.5, 0.5],
    [1, 1]
  ]
}
Image

In this case, one point is strictly on the interior of the polygon, while one point is on the boundary. This previously returned false, but the way I (and DE-9IM) see it should return true.

Resolves #3025

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

booleanContains does not align with DE9-IM behaviour for Polygons containing MultiPoints

1 participant