Replies: 1 comment 3 replies
-
The specific problem seems to be with the corners of the rectangle. Zooming in on the top left one: So you can see that the actual "area" are only those tiny parts in the corner. I suppose this is also the reason why a typical method of taking the buffer(0) doesn't work. It actually does "work", but it gives you a valid MultiPolygon consisting of those 4 tiny corner polygons. When we ask for the reason the polygon is invalid, we also get:
Given the structure of the current polygon you have, and that this doesn't lend itself to the typical methods to turn it into a valid polygon, the easiest way to get the actual rectangular polygon might be to get the bounding box (envelope):
|
Beta Was this translation helpful? Give feedback.
-
Please note
I got a polygon but it is invalid and the area is zero. The polygon looks like this,
How can I get a valid polygon? More specifically, a valid rectangle in this case. I have tried several methods but none of them works. The code is attached below:
Beta Was this translation helpful? Give feedback.
All reactions