[postgis-tickets] [PostGIS] #2422: geography regression difference ST_DWithin

PostGIS trac at osgeo.org
Mon Feb 3 21:43:03 PST 2014


#2422: geography regression difference ST_DWithin
---------------------+------------------------------------------------------
 Reporter:  robe     |       Owner:  pramsey      
     Type:  defect   |      Status:  new          
 Priority:  high     |   Milestone:  PostGIS 2.1.2
Component:  postgis  |     Version:  2.1.x        
 Keywords:           |  
---------------------+------------------------------------------------------

Comment(by robe):

 Some sort of floating point abberation with converting to radians:


 {{{
 SELECT gid, _ST_DWithin(geog, tgeog, 1600,true )
 , ST_Distance(geog, tgeog) , _ST_DistanceUnCached(geog, tgeog) As
 uncached_dist
 FROM  dwithgeogbug CROSS JOIN ST_GeogFromText('POINT(-69.83262 43.43636)')
 As tgeog;

  gid | _st_dwithin |  st_distance   |  uncached_dist
 -----+-------------+----------------+------------------
    1 | t           | 1400.230346843 | 1400.23034684253
    2 | t           | 1005.627279769 | 1005.62727976866
 }}}



 {{{
 SELECT gid, _ST_DWithin(geog, tgeog, 1609,true )
 , ST_Distance(geog, tgeog) , _ST_DistanceUnCached(geog, tgeog) As
 uncached_dist
 FROM  dwithgeogbug CROSS JOIN ST_GeogFromText('POINT(-69.83262 43.43636)')
 As tgeog;

  gid | _st_dwithin |  st_distance   |  uncached_dist
 -----+-------------+----------------+------------------
    1 | t           | 1400.230346843 | 1400.23034684253
    2 | f           | 1005.627279769 | 1005.62727976866
 }}}


 how can a bigger radius result in false when a smaller radius results in
 true

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/2422#comment:33>
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