[postgis-devel] Should EMPTY be spatially equal to self ?

Paragon Corporation lr at pcorp.us
Sun Jan 15 14:14:33 PST 2012


 
Sandro,

I thought I mentioned this already.  ST_Equals should be false for two empty
geometries otherwise the fundamental foundation of spatial intersection we
rely on crumbles to its knees. How do we know two things do not intersect
because their intesection is empty space.

Let me put it another way.  ST_Equals is the same as:

SELECT ST_Relate('POINT EMPTY'::geometry, 'POINT EMPTY'::gemetry,
'T*F**FFF*');

So only the interior of a geometry should intersect and since empty does not
intersect with empty (the interior of empty is empty),
it violates the fundamental rule of spatial equality.

NOTE: This is very different from ST_OrderingEquals.  I'll give you that
they are geometrically equal but not spatially equal.

They may or may not have same geometry (e.g. I would say POINT EMPTY should
probably be considered different from LINESTRING EMPTY, but I don't care)
 but they share no space.  

Thanks,
Regina







More information about the postgis-devel mailing list