[postgis-devel] Empty behavior
Paragon Corporation
lr at pcorp.us
Thu Dec 30 22:56:16 PST 2010
Paul,
I'm not sure if this is a bug or not:
If I do this:
SELECT ST_ContainsProperly(foo1.the_geom, foo2.the_geom) As result,
ST_AsEWKT(foo1.the_geom) As ref1_geom, ST_AsEWKT(foo2.the_geom) As ref2_geom
FROM ((SELECT ST_Collect(s.the_geom) As the_geom
FROM (SELECT
ST_MakeLine(ST_SetSRID(ST_Point(i,j),4326),ST_SetSRID(ST_Point(j,i),4326))
As the_geom
FROM generate_series(-10,50,10) As i
CROSS JOIN generate_series(40,70, 15) As j
WHERE NOT(i = j)) As s)) As foo1 CROSS JOIN (
(SELECT ST_GeomFromText('GEOMETRYCOLLECTION EMPTY',4326) As
the_geom ) ) As foo2 LIMIT 2;
On the gserialized I get 'f'
On the non-gserialized it throws an error:
ERROR: Relate Operation called with a LWGEOMCOLLECTION type. This is
unsupported.
HINT: Change argument 2: 'GEOMETRYCOLLECTION EMPTY'
--- however this fails on both with the change argument 2 .
SELECT ST_ContainsProperly(ST_GeomFromEWKT('SRID=4326;MULTILINESTRING((-10
40,40 -10),(-10 55,55 -10),(-10 70,70 -10),(0 40,40 0),(0 55,55 0),(0 70,70
0),(10 40,40 10),(10 55,55 10),(10 70,70 10),(20 40,40 20),(20 55,55 20),(20
70,70 20),(30 40,40 30),(30 55,55 30),(30 70,70 30),(40 55,55 40),(40 70,70
40),(50 40,40 50),(50 55,55 50),(50 70,70 50))'),
ST_GeomFromEWKT('SRID=4325;GEOMETRYCOLLECTION EMPTY') )
How is the first different from the second? (curiously if I use
ST_GeomFromText in the second I get back the same answers as above)
More information about the postgis-devel
mailing list