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

Obe, Regina robe.dnd at cityofboston.gov
Tue Dec 9 04:04:57 PST 2008


 
Ghislain,

The only time I have seen this kind of behavior is when centroid returns an empty geometry collection.  In those cases its because the geometry is invalid.

Although none of your geometries are invalid, it could be a bug in either the centroid code or isvalid check that may or may not be fixed in 3.0.3+ of GEOS.


Can you do the following

SELECT gid, the_geom 
FROM ZS2C
WHERE isempty(centroid(the_geom))


and send us as an attatched file with one of those geometries.  We can cross check with GEOS 3.0.3 or 3.1 to see if the issue still remains.

Thanks,
Regina
-----Original Message-----
From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Ghislain Geniaux
Sent: Monday, December 08, 2008 1:29 PM
To: PostGIS Users Discussion
Subject: Re: [postgis-users] how to identify the_geom that cause:RelateOperation called withLWGEOMCOLLECTION type

On Linux  :

POSTGIS="1.3.1" GEOS="3.0.0-CAPI-1.4.1" PROJ="Rel. 4.6.0, 21 Dec  
2007" USE_STATS
(1 row)

On Macos

  POSTGIS="1.2.1" GEOS="3.0.0-CAPI-1.4.1" PROJ="Rel. 4.6.0, 21 Dec  
2007" USE_STATS
(1 row)

same result with the two platform and postgis version.

Thanks.

Le 8 déc. 08 à 17:53, Paragon Corporation a écrit :

> What does
>
> SELECT postgis_full_version();
>
> Return
>
> Thanks,
> Regina
> -----Original Message-----
> From: postgis-users-bounces at postgis.refractions.net
> [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of  
> Ghislain
> Geniaux
> Sent: Monday, December 08, 2008 11:03 AM
> To: PostGIS Users Discussion
> Subject: Re: [postgis-users] how to identify the_geom that cause
> :RelateOperation called withLWGEOMCOLLECTION type
>
> I've no collection. It's looks like a bug.
>
> Moreover my table is very large wiht more than 500 000 geometry and i
> found no solution to identy the wrong geom.
>
> Here you can see the query, with the same result on different
> plateform (LINUX DEBIAN, MACOS, with GEOS 3)
>
> otm=# select distinct geometrytype(the_geom) from ZS2c;
>   geometrytype
> --------------
>   MULTIPOLYGON
> (1 row)
>
> otm=# select distinct geometrytype(the_geom) from bd_dispo_finalc ;
>   geometrytype
> --------------
>   MULTIPOLYGON
>   POLYGON
> (2 rows)
>
> otm=# create table info_nonvoue1 as
> otm-# select b.id_parc, z.niv from bd_dispo_finalc as b, ZS2c as z
> otm-# where z.niv=1 and intersects(centroid(b.the_geom),z.the_geom)
> and b.the_geom && z.the_geom and isvalid(b.the_geom) and isvalid
> (z.the_geom);
> ERROR:  Relate Operation called with a LWGEOMCOLLECTION type.  This
> is unsupported
> otm=#
>
>
>
> Le 8 déc. 08 à 13:32, Obe, Regina a écrit :
>
>> 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
>>
>> SELECT *
>> 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
>> Operation
>>> 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
>> is
>>> 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.
>>
>> Nicolas
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users at postgis.refractions.net
>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>> -----------------------------------------
>> 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.
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users at postgis.refractions.net
>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>
>
> ------------------------------------------
> Geniaux Ghislain
> INRA SAD Ecodéveloppement
> Site Agroparc
> Domaine St Paul
> 84914 Avignon Cedex 9
>
> Tél : 04 32 72 25 64
> Fax : 04 32 72 25 62
>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users



------------------------------------------
Geniaux Ghislain
INRA SAD Ecodéveloppement
Site Agroparc
Domaine St Paul
84914 Avignon Cedex 9

Tél : 04 32 72 25 64
Fax : 04 32 72 25 62


_______________________________________________
postgis-users mailing list
postgis-users at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users
-----------------------------------------
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