turf.bboxClip returns a polygon instead of a MultiPolygon #2816
Unanswered
tsairinius
asked this question in
Q&A
Replies: 3 comments 1 reply
-
Hi @tsairinius. Can you please attached the returned geojson (the red rectangles)? |
Beta Was this translation helpful? Give feedback.
1 reply
-
Confirming this. As a test case: In:
Out:
|
Beta Was this translation helpful? Give feedback.
0 replies
-
For completeness, the linestring case does behave correctly: ![]() |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm using turf.bboxClip to clip a portion of a polygon...
Here's the result:

blue = bounding box
green = original polygon
red = the clipped polygon
Notice that the two red rectangles within the bounding box are connected by a line. I would have expected the clipped portion of the polygon to be represented by a MultiPolygon containing two polygons for each of the rectangles. Instead, the rectangles are grouped as a single polygon (hence the line connecting them). Is there any way to have them be represented as two separate polygons?
Beta Was this translation helpful? Give feedback.
All reactions