[postgis-users] Followup - Re: Intersection problems with complex polygons, (TECHER Jean David)

Andreas Neumann neumann at karto.baug.ethz.ch
Thu Jan 13 01:53:58 PST 2005

Salut Jean-David,

Thank you for answering and sorry my late reply.

>Hi Andreas
>I'm a friend of Bernd :-)
yes, I know you you "virtually" through Bernd and André ;-)

>If you make a zoom in the intersection area you have two disjoint polygons
>in this intersection ...just see the attached images...

I could not see the attached image (I get the mails in a digest and the 
link in the archives did not correctly display) - could you please mail 
it to me privately? (neumann at karto.baug.ethz.ch)

I made my own investigations on the problem meanwhile. You can find the 
situation in the following two files:

query: http://www.carto.net/neumann/temp/intersection_test.sql.gz
visualization of the result: 

Explanation of the visualization of the problem:

The green polygon is the input polygon, the red-stroked/unfilled 
rectangle is the intersect polygon.

The result is a geometry collection containing two lines and three 
polygons. AsSVG cannot display geometry collections, so I manually split 
the result using astext and fed the individual parts to AsSvg. Anyway, 
I'd expect when intersecting a polygon with a polygon, that I'd receive 
a multipolygon as a result and not a geometry collection containing also 

The visualized result in 
http://www.carto.net/neumann/temp/intersection_result.svg shows the 
correctly intersected part (blue filled polygons) and the two 
linestrings I got in the resulting geometry collection with a thicker 
red and blue stroke.

So - I still think that this is a bug in Postgis/Geos. Unless I 
misunderstood what the "intersection" function actually does.

When zooming in the original GIS (ESRI Arcmap) I found out that the two 
small holes (the red and blue thickly stroked polygons) touch each 
other. That might explain the problem.

Any help on that situation is appreciated. Meanwhile I can fix the bug 
by changing the input geometry a little bit, but for the long run I 
would appreciate having a better solution than having to change the 
original geometry.

Thanks and all the best,

Andreas Neumann - Department of Cartography 
Swiss Federal Institute of Technology (ETH) 
ETH Hoenggerberg, CH-8093  Zurich, Switzerland 
Phone: ++41-1-633 3031, Fax: ++41-1-633 1153 
e-mail: neumann at karto.baug.ethz.ch 
www: http://www.karto.ethz.ch/neumann/ 
SVG.Open: http://www.svgopen.org/ 
Carto.net: http://www.carto.net/

More information about the postgis-users mailing list