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

Havard Tveite havard.tveite at umb.no
Tue Jan 17 06:31:10 PST 2012


On 1/17/2012 9:31 AM, Sandro Santilli wrote:
> [postgis-devel back in the loop]
> On Mon, Jan 16, 2012 at 02:19:58PM -0800, Martin Davis wrote:
>> - According to the SFS, the DE9IM entry for the empty set is F.  So I agree
>> with Sandro that the DE9IM for two empty geometries is:
>>
>> FFF.FFF.FF2
>>
>> (since the intersections I/I, B/B, and E/E are all empty)
>>
>> According to the SF definition of Equals (TFF.FTF.FFT) this means that
>> Equals(EMPTY, EMPTY) = false.  Maybe not the most desirable result in some
>> situations, but it's good to be consistent.  After all, that's the whole
>> reason for defining the predicates in terms of the DE9IM in the first place.
>
> Speaking of consistency, this is the DE9IM of a point to itself:
>
>         0FF.FFF.FF2
>
> It doesn't match the SF definition of Equals (B/B is false).
> Should a point not be equal to itself for the sake of being consistent ?
>
> The SFS standard is short on this topic, as well as on the topic of
> empties in general. I wouldn't hung on following it literally.

I agree with strk regarding the use of the Simple Feature for
SQL Specification as the "bible".  Being what PostGIS is, we
should do our best to do the "right thing", and then try to
convince those responsible for the specifications and standards
to do the same.  Then the other players will come to their
senses. ;-)

Spatial joins / spatial predicates in SQL/MM Spatial are based
on the DE9IM.  How sound is this foundation?
FFF.FFF.FF2 is a sensible DE9IM matrix for empty - empty in
set theoretical terms, but does it make sense to apply it for
spatial predicates?  Many say yes, some say no.

Since there are so many knowledgeable people around here:

According to SFS, a point has no boundary.  So I guess it
must have an interior.
What is the boundary of a point in a two dimensional space
according to point set topology?  Does such a point have an
interior?

According to SFS, the boundary of a line is its endpoints
(empty if it is closed).
What is the boundary of a line in a two dimensional space
according to point set topology?  Does such a line have an
interior?

This seems to be a much definition of interior in point set
topology:
"The interior Int(A) is the union of all open sets contained
in A."


I still think it would have been better for SQL/MM Spatial to
exclude empties from the spatial predicates by saying that all
spatial predicates should return NULL when an empty geometry
is involved, as empties do not make much sense in this context.


Håvard

-- 
Håvard Tveite
Department of Mathematical Sciences and Technology, UMB
Drøbakveien 31, POBox 5003, N-1432 Ås, NORWAY
Phone: +47 64965483 Fax: +47 64965401 http://www.umb.no/imt/



More information about the postgis-devel mailing list