[postgis-devel] Is errorIfGeometryCollection necessary for relate ops?
Mike Toews
mwtoews at gmail.com
Thu Apr 9 16:55:08 PDT 2015
I'm wondering why expressions like this have an error:
SELECT ST_Equals(
'GEOMETRYCOLLECTION(POINT(1 2),POINT(3 4))',
'GEOMETRYCOLLECTION(POINT(3 4),POINT(1 2))');
ERROR: Relate Operation called with a LWGEOMCOLLECTION type. This is
unsupported.
HINT: Change argument 1: 'GEOMETRYCOLLECTION(POINT(1 2),POINT(3 4))'
CONTEXT: SQL function "st_equals" statement 1
I've tracked this down to errorIfGeometryCollection in
postgis/lwgeom_geos.c. Is this check still necessary? I suspect that
GEOS supports relate operations on geometry collections, e.g., with
shapely:
from shapely.wkt import loads
g1 = loads('GEOMETRYCOLLECTION(POINT(1 2),POINT(3 4))')
g2 = loads('GEOMETRYCOLLECTION(POINT(3 4),POINT(1 2))')
print(g1.equals(g2)) # True
print(g1.relate(g2)) # 0FFFFFFF2
so I'm wondering what is stopping PostGIS from supporting relate
operations with geometry collections?
More information about the postgis-devel
mailing list