[postgis-tickets] [PostGIS] #2168: ST_Distance is not always commutative

PostGIS trac at osgeo.org
Fri Apr 12 17:47:16 PDT 2013


#2168: ST_Distance is not always commutative
---------------------------+------------------------------------------------
 Reporter:  realityexists  |       Owner:  pramsey      
     Type:  defect         |      Status:  new          
 Priority:  medium         |   Milestone:  PostGIS 2.0.4
Component:  postgis        |     Version:  trunk        
 Keywords:                 |  
---------------------------+------------------------------------------------

Comment(by robe):

 My 32-bit PostgreSQL 9.2 on my windows 7 64-bit behaves like yours (0 for
 first and 1.18234311230481e-010 for second)

 Windows 2008 and windows 7 64-bit 9.2 64-bit
 {{{
 9.31322574615479e-010 for the first
 1.18234311230481e-010 for the second
 }}}


 {{{
 --just to test constancy
 SELECT ST_Distance(g1,g2) As dist_g1_g2, ST_Distance(g2,g1) AS dist_g2_g1
 FROM (SELECT 'POINT(18.5107234 54.7587757)'::geography As g1,
 'POINT(18.58218 54.7344227)'::geography As g2) As a;

    dist_g1_g2    |    dist_g2_g1
 -----------------+------------------
  5340.7623739472 | 5340.76237394708
 }}}

 I guess seems to only happen on Windows.
 Paul did you say you are going to just bite the bullet and round or is
 this nanometer issue something we should be worried about and the fact
 only iwnodws exhibits it.

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