[postgis-devel] [PostGIS] #259: ST_Distance geography throws an error with empty geographies
PostGIS
trac at osgeo.org
Tue Oct 6 04:01:56 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 robe):
Okay I'm fine with NULL. Don't care to argue the philosophy of where or
where not an empty geometry is located in the world. However all I'm
saying is geography distance and geometry distance should behave
consistently. So if you are going to change it to NULL -- we should
probably do the same for geometry distance. or we can say not to bother
since geography is new we can break old habits. I feel very unstrongly
about the choice of NULL and 0 (and lukewarm about maintaining
consistency) -- so I leave it up to the rest of you to decide.
FWIW: SQL Server 2008 returns NULL when I do this.
SELECT geometry::STGeomFromText('POLYGON
EMPTY',4326).STDistance(geometry::STGeomFromText('POLYGON EMPTY',4326))
Wonder how other databases react to this question.
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/259#comment:7>
PostGIS <http://trac.osgeo.org/postgis/>
PostGIS
More information about the postgis-devel
mailing list