[postgis-tickets] [PostGIS] #2965: ST_Distance, use_spheroid default

PostGIS trac at osgeo.org
Mon Oct 13 06:32:02 PDT 2014


#2965: ST_Distance, use_spheroid default
---------------------------------------+------------------------------------
 Reporter:  gitai                      |       Owner:  pramsey      
     Type:  defect                     |      Status:  new          
 Priority:  critical                   |   Milestone:  PostGIS 2.1.5
Component:  postgis                    |     Version:  2.1.x        
 Keywords:  ST_Distance, use_spheroid  |  
---------------------------------------+------------------------------------

Comment(by nicklas):

 Replying to [comment:5 gitai]:
 > Actually, coming to think of it, the bug is that the ST_Distance
 interface does not  properly enforce type safety between geometry and
 geography.


 Well, it is a result of function overload.

 It behaves different depending on what type you are giving to it.

 That is very common behavior, but what might be confusing is the
 distinction between geometry and geography type.

 http://postgis.net/docs/manual-
 dev/using_postgis_dbmanagement.html#PostGIS_Geography

 A geometry type and geography type can both hold spatial information in
 srid 4326. But the calculations on geography type will be on the sphere
 and on geometry type will be planar.

 I wouldn't call it a bug since it is by design, but maybe confusing first
 time you see it.

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/2965#comment:7>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-tickets mailing list