Opened 8 years ago

Closed 8 years ago

#747 closed defect (invalid)

ST_OrderingEquals of GEOMETRYCOLLECTION EMPTY

Reported by: robe Owned by: pramsey
Priority: low Milestone: PostGIS 2.0.0
Component: postgis Version: trunk
Keywords: Cc:

Description

Did we ever decide what the answer of this should be.

SELECT ST_OrderingEquals(foo1.the_geom, foo1.the_geom) As result

FROM (

(SELECT ST_GeomFromText('GEOMETRYCOLLECTION EMPTY',4326) As the_geom )

) As foo1 ;

In my 1.5 install and gserialized 2.0 install, the answer is: 'f'

But in non-gserialized the answer is

't'

I've always thought of ordering equals as almost like a binary equality so I would expect the answer to be true, but emptiness is such a strange thing.

Change History (2)

comment:1 Changed 8 years ago by robe

But to add very disturbingly.

For the gserialized while the ST_GeomFromText is false,

The answer to this: SELECT ST_OrderingEquals(foo1.the_geom, foo1.the_geom) As result

FROM (

(SELECT ST_GeomFromEWKT('SRID=4326;GEOMETRYCOLLECTION EMPTY') As the_geom )

) As foo1 ;

Is True. It's as if the GeomFromEWKT and FromText? are creating two different things indistiguishable from each other in text but binary different.

comment:2 Changed 8 years ago by robe

Resolution: invalid
Status: newclosed

The real different is with && not _ST_OrderingEquals. I'll put that in as a separate ticket I sure hope its limited to empty geometries.

Note: See TracTickets for help on using tickets.