Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I clean up self-intersecting polygons in a spatial database?

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.

like image 932
Peter Becker Avatar asked Jan 30 '11 23:01

Peter Becker


People also ask

How do you fix a self-intersecting polyline?

A self-intersecting polyline can be corrected by entering edit mode and show the vertices ( ). You can right click on the incorrect vertex and delete or move it or use the tools on the Edit Vertices tool bar to correct it.

Can polygons be self-intersecting?

A polygon can be self-intersecting, meaning edges cross other edges. (The points of intersection are not vertices.)

What is self intersection GIS?

This tool modifies the input data. See Tools that modify or update the input data for more information and strategies to avoid undesired data changes. If a feature intersects itself at a point and continues by crossing itself, it is considered a self-intersection.

When to use Intersect Tool in GIS?

The Intersect Tool works for points, lines, and polygonsIf you want to find where points, lines, or polygons overlap, the Intersect Tool is versatile and can work with any of these data types. For example, two intersecting line layers can create points where they overlap.


1 Answers

I figured it out myself: an st_buffer(wkb_geometry,0) does the trick, at least on my sample data.

like image 147
Peter Becker Avatar answered Sep 23 '22 17:09

Peter Becker