[postgis-devel] Should EMPTY be spatially equal to self ?
Sandro Santilli
strk at keybit.net
Mon Jan 16 05:42:40 PST 2012
On Sat, Jan 14, 2012 at 12:44:34AM +0100, Havard Tveite wrote:
> How would you explain the result of ST_Equals(empty,empty)
> according to point set topology? the 9-intersection
> model* says that "equals" has the following matrix (T:
> non-empty, F: empty, i: interior, b: boundary, e:
> exterior):
>
> i b e
> i T F F
> b F T F
> e F F T
As I just said to regina, the above isn't always true.
A point has no boundary, so BB can't be T.
> I suppose that empty geometries have an empty interior and
> an empty boundary. Then their exterior would be the
> universal set. In that case (and if the empty set is a
> member of all sets, also for point set topology), I would
> think that the matrix should be all T's, and that is not
> the matrix of ST_Equals.
There's no such thing as the "equals matrix".
> So I don't think it makes sense to return anything else than
> NULL for ST_Equals on empty geometries.
The sense I see about is is that ST_Equals(A, A) should be true,
for anything which isn't NULL. If EMPTY should be threated the
same as NULL I don't see why we have EMPTY at all.
> In a practical situation, I would not like a spatial join
> with ST_Equals as the join predicate to get matches when one
> or both of the geometries are empty, since their spatial
> relationship cannot be determined (in my opinion).
I belive the spatial relationship of two empty geometries
is well defined as :
i b e
i F F F
b F F F
e F F 2
--strk;
() Free GIS & Flash consultant/developer
/\ http://strk.keybit.net/services.html
More information about the postgis-devel
mailing list