How do I clean up self-intersecting polygons in a spatial database?
-
27-10-2019 - |
Question
I have some spatial data (MapInfo files) that contains self-intersecting polygons. These cause problems in my processing, in particular I can't generate geometric unions in PostGIS. Is there an easy way to resolve the issue? I can deal with multi-polygons if that should be necessary.
Solution
I figured it out myself: an st_buffer(wkb_geometry,0)
does the trick, at least on my sample data.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow