turf
turf copied to clipboard
booleanContains with MultiPolygon
Consider the following three polygons, pink, green, and yellow:
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:
- Turf version:
6.5.0 - GeoJSON data
- Example source code