[postgis-users] Problem with Intersection(Geometry, Geometry)

Matt Doughty matt.doughty at geograma.com
Tue Nov 20 23:16:12 PST 2007


Hi all,

 

I'm having some problems with the intersection function that I've been
trying to use as a Cookie cutter command.

 

I've been executing the following script:

 

SELECT 

            INTERSECTION(<cookie>.the_geom, <cookie-cutter>.the_geom) AS
the_geom

INTO

            <output>

FROM 

            <cookie>, 

            <cookie-cutter>

WHERE 

            <cookie>.the_geom && <cookie-cutter>.the_geom

AND 

            intersects(<cookie>.the_geom, <cookie-cutter>.the_geom);

 

The problem it gives me is that polygons which need to be cut don't turn
out right. The output retuns to the geometry column a GeometryCollection
for the polygon in question. This is composed of one polygon, which is
what I want, and a collection of linestrings, each of which represents a
segment of the boundary of the cutting polygon, which obviously I don't
want.

 

Has anybody come across this and how can I solve the problem?

 

Cheers,

 

Matt

 

 

 

 

Matt Doughty

 

GEOGRAMA S.L.

Tel.:  +34 945 13 13 72    652 77 14 15

Fax: +34 945 23 03 40 

www.geograma.com

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20071121/0bd3e04c/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 3743 bytes
Desc: image001.jpg
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20071121/0bd3e04c/attachment.jpg>


More information about the postgis-users mailing list