[postgis-devel] EMPTY

Chris Hodgson chodgson at refractions.net
Tue Oct 6 12:03:53 PDT 2009


EMPTY will get used because it is the result of some spatial operations, 
ie. a empty intersection or difference. I think this is the primary 
consideration for the handling of empty geometries, ie. that subsequent 
chained operations or comparisons can operate on the an empty result in 
a way that doesn't require special handling. eg. a query like this:

SELECT * FROM a JOIN b JOIN c WHERE st_intersects( st_intersection( 
a.geom, b.geom ), c.geom );

I would dare say that geometry empty is more like zero, than null. The 
SQL null value is different from the GEOMETRY EMPTY in that EMPTY is an 
expected result of a successful, valid, operation, where null generally 
is not, save for operations that are specifically designed to deal with 
nulls.

Chris

Martin Davis wrote:
> One note on your semantics.  I think that
>
> ST_Intersects( empty, empty ) == FALSE
>
> The motivation for this is that EMPTY in the spatial realm is 
> analogous to NULL in the SQL realm.  If there's nothing there, you 
> can't determine anything about it.
>
> Although really I don't think any of this matters all that much, 
> absent any clear use case for using EMPTY.
>
> Paul Ramsey wrote:
>> I've started a page on the semantics of empty. Please feel free to add
>> cases, clarify and discuss...
>>
>> http://trac.osgeo.org/postgis/wiki/DevWikiEmptyGeometry
>>
>> P.
>> _______________________________________________
>> postgis-devel mailing list
>> postgis-devel at postgis.refractions.net
>> http://postgis.refractions.net/mailman/listinfo/postgis-devel
>>
>>   
>




More information about the postgis-devel mailing list