Working with both ArcGIS and Oracle Spatial, a self-intersecting polygon renders a geometry invalid. Why are self-intersecting polygons a problem?

• Most software programs will flag them as bad. It would be better if they were treated as separate polygons which could then be summarized into a multipart polygon allowing for the parts to be accessed individually. – user681 Aug 8 '12 at 21:03

It's a result of the algorithms used for generating the polygons.

A polygon is usually made up of multiple line segments. A list showing which polygon is on the left and right of each segment is used to determine which polygon is which. Each segment has only one entry in this list.

Suppose you have a line segment which goes from point A to point B. One one side of the line is polygon 1 and on the other is polygon 2. When you go from A to B, polygon 1 is on the left, and polygon 2 is on the right.

If that line crosses over itself to form a loop, then the left and right polygons get reversed for the portion within the loop. The list still shows polygon 1 being on the left and polygon 2 being on the right, even though that is not the case within the loop.

Thus if you try to fill a polygon or determine its neighboring polygon, the algorithm gets confused when a loop is present, and it will fill or indicate the wrong polygon. This is why most software reports this situation as being invalid.

It might be possible to automatically identify the self intersection and correct the problem, but these sorts of problems are supposed to be fixed before you get to analyzing the data.

It becomes hard to tell what is the inside and what is the outside of the polygon.

• Is that a limitation of the algorithms used for boundary detection? – Jordan Parmer Aug 8 '12 at 21:15
• J0rd4n, It's inherent in the topology of the plane: think of such polygons as lower-dimensional analogs of immersions in space of a Klein bottle or projective plane. When a polygon's boundary intersects itself transversely, it will wind in a positive direction around some of its apparent interior points and in a negative direction around others. This creates problems with all kinds of overlay algorithms, many of which rely (correctly) on the interior having a consistent orientation rather than multiple orientations. Requiring consistency is no limitation, as @Dan Patterson points out. – whuber Aug 8 '12 at 22:02