Skip to content

booleanContains with MultiPolygon #2337

@Debakel

Description

@Debakel

Consider the following three polygons, pink, green, and yellow:

grafik

turf.booleanContains(green, yellow) correctly returns True, because green spatially contains yellow.
However, if a MultiPolygon is built out of pink and green, an exception is thrown:

var pink_and_green = turf.multiPolygon(pink, green)
turf.booleanContains(pink_and_green, yellow)
// ❌ Error: feature1 MultiPolygon geometry not supported

Is there a reason why turf does not support this? Or is it just not implemented yet?


Please provide the following when reporting an issue:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions