[postgis-users] Re: GeometryCollection Intersection
Martin Davis
mbdavis at refractions.net
Fri May 30 08:46:02 PDT 2008
Yes, that's correct, the geometry relationship predicates are not
available for GeometryCollections. The reason for this is that because
GC's have very loose semantics (e.g. polygons can cross one another
being the main one) it's not possible to robustly & exactly evaluate
some predicates in certain situations.
I guess intersection can always be evaluated correctly, however. With
the new work on prepared geometry, we perhaps could look at widening the
scope a bit. (This might even be supported right now - I can't remember
offhand).
Markus Schneider wrote:
> Hello again,
>
> actually I wanted to ask about the "intersects" operator (and not
> "intersection") which is used in the given example query.
>
> Markus Schneider wrote:
>
>> Hello,
>>
>> is it correct that geometric operations (especially intersection) are not
>> available if one of the geometries is a GeometryCollection?
>>
>> My postgis_full_version() is:
>>
>> "POSTGIS="1.3.1" GEOS="2.2.3-CAPI-1.1.1" PROJ="Rel. 4.4.9, 29 Oct 2004" USE_STATS"
>>
>> When I try to execute the following statement:
>>
>> SELECT X1.GEOM,X1.NAME,X1.ID FROM MULTITEST X1
>> WHERE X1.GEOM && SetSRID('BOX3D(174259.098 487844.529, 177282.329
>> 484821.298)'::box3d,28992)
>> AND intersects (X1.GEOM, SetSRID('BOX3D(174259.098 487844.529, 177282.329
>> 484821.298)'::box3d,28992))
>>
>> I get the error message:
>>
>> ERROR: Relate Operation called with a LWGEOMCOLLECTION type. This is unsupported
>> SQL Status:XX000
>>
>> I already digged the source code a bit and found the apparent source of the
>> message in lwgeom_geos_c.c. It's the check errorIfGeometryCollection(...).
>>
>> Is there any chance to perform an intersection between a Box and a
>> GeometryCollection anyway? Or are there plans to implement this?
>>
>> Thanks in advance,
>>
>
>
> Best regards,
>
--
Martin Davis
Senior Technical Architect
Refractions Research, Inc.
(250) 383-3022
More information about the postgis-users
mailing list