[postgis-users] Intersection problems with complex polygons

TECHER Jean David davidtecher at yahoo.fr
Fri Jan 7 03:41:06 PST 2005


Hi Andreas

I'm a friend of Bernd :-)

I tried your SQL file in two postgis tables...= One for the mulitpolygon
that I called anmp and the polygon (rectangle) ansp

I viewed the tables with QGIS ...It seems normal that you have a
geoemtrycollection
instead of a polygon as an expected intersection...


For the intersection I do

create table "aninter" (gid serial);
SELECT
AddGeometryColumn('','aninter','the_geom','26911','MULTILINESTRING',2);
INSERT INTO "aninter" (gid,"the_geom") VALUES ('0',
GeometryFromText(
                                AsText(

Intersection(Boundary(anmp.the_geom),
                                                            ansp.the_geom
                                                            )
                                            )
                                        ,26911);
If you make a zoom in the intersection area you have two disjoint polygons
in this intersection ...just see the attached images...
----------------------------------------------------------------
TECHER Jean David
Responsable Informatique 01MAP
e-mail: davidtecher at yahoo.fr
Bureau: 04 67 45 60 27
Portable: 06 85 37 36 75
site perso : http://techer.pascal.free.fr/postgis/
site pro: http://www.01map.com/download/
K-S:"The greatest trick the devil pulled off was convincing people he didn't
exist"
------------------------------------------------------------
----- Original Message -----
From: "Andreas Neumann" <neumann at karto.baug.ethz.ch>
To: <postgis-users at postgis.refractions.net>
Sent: Thursday, January 06, 2005 12:47 PM
Subject: [postgis-users] Intersection problems with complex polygons


> Hi,
>
> I regularly run into intersection problems when using intersection
> between a rectangle (defined as a POLYGON) and a very complex polygon
> (MULTIPOLYGON).
>
> After intersection I expect to get back a MULTIPOLYGON, however, it
> results in a GEOMETRYCOLLECTION not only containing POLYGON or
> MULTIPOLYGON elements, but also LINESTRINGs.
>
> I can't understand why? is there a limit in complexity or a bug in the
> GEOS library?
>
> To reproduce my problem I have a SQL query online, containing the two
> geometries: http://www.carto.net/neumann/temp/intersection_test.sql.gz -
> the first geometry is fairly complex, but a realworld example from the
> Yosemite National Park.
>
> I am using the latest GEOS library (2.1.1) and the latest postgis
> version (0.9.1).
>
> Any hints would be welcome.
>
> Thanks,
> Andreas
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: zoom.zip
Type: application/octet-stream
Size: 116209 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20050107/19400895/attachment.obj>


More information about the postgis-users mailing list