[postgis-devel] [PostGIS] #259: ST_Distance geography throws an error with empty geographies

PostGIS trac at osgeo.org
Tue Oct 6 08:56:21 PDT 2009


#259: ST_Distance geography throws an error with empty geographies
----------------------+-----------------------------------------------------
  Reporter:  robe     |       Owner:  pramsey      
      Type:  defect   |      Status:  closed       
  Priority:  medium   |   Milestone:  postgis 1.5.0
 Component:  postgis  |     Version:               
Resolution:  fixed    |    Keywords:               
----------------------+-----------------------------------------------------
Comment (by mcayland):

 That's a tricky one... Off the top of my head, I see this:

 ST_DWithin(null, null)      -> null
 ST_DWithin(null, geometry)  -> null
 ST_DWithin(geometry, null)  -> null

 i.e. if any input parameter is null, the output is null

 ST_DWithin(empty, geometry)  -> false
 ST_DWithin(geometry, empty)  -> false

 i.e. if any input parameter is a geometry (but empty) then the predicate
 can never be true (because an empty geometry exists but has no area or
 perimeter)


 It would be nice to come up with a definitive reference for this, whatever
 we choose, and put it up somewhere on the wiki.


 ATB,

 Mark.

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/259#comment:11>
PostGIS <http://trac.osgeo.org/postgis/>
PostGIS


More information about the postgis-devel mailing list