[postgis-users] how to identify the_geom that cause : RelateOperation called withLWGEOMCOLLECTION type

Obe, Regina robe.dnd at cityofboston.gov
Mon Dec 8 04:32:37 PST 2008

Many of the GEOS relation functions do not work with collections.

You must have a geometry collection in there somewhere or its a bug.
Also which relation function were you trying?

To figure out the type of your geometries, run

FROM sometable
WHERE GeometryType(the_geom) = 'GEOMETRYCOLLECTION'


-----Original Message-----
From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of
Nicolas Ribot
Sent: Monday, December 08, 2008 6:22 AM
To: PostGIS Users Discussion
Subject: Re: [postgis-users] how to identify the_geom that cause :
RelateOperation called withLWGEOMCOLLECTION type

> I have an error with some geometry that cause : "ERROR Relate
> called withLWGEOMCOLLECTION type".
> All the geometries seem clean (valid, non empty, closed, only POLYGON,
> My question : how to get information of which geometry cause the
problem ?
> Is there a way  to have information about the geometry during postgis
> working on a  SQL query ?
> Thanks.

Hi Ghislain,

What the query that failed looks like ?
The message is telling that one geometry has an invalid type.
In your query, you could try to ask for ST_GeometryType(geometry) and
a geometry identifier to see which geometry has the wrong type.
If you perform a spatial operation, it is possible that
geometryCollection is produced.
You could maybe split your query into smaller block to see where such
collections are generated.

postgis-users mailing list
postgis-users at postgis.refractions.net
The substance of this message, including any attachments, may be
confidential, legally privileged and/or exempt from disclosure
pursuant to Massachusetts law. It is intended
solely for the addressee. If you received this in error, please
contact the sender and delete the material from any computer.

More information about the postgis-users mailing list