[postgis-tickets] [PostGIS] #2847: ST_DISTANCE between geography points incorrect

PostGIS trac at osgeo.org
Fri Jul 18 15:54:29 PDT 2014


#2847: ST_DISTANCE between geography points incorrect
----------------------+-----------------------------------------------------
  Reporter:  rotten   |       Owner:  pramsey
      Type:  defect   |      Status:  closed 
  Priority:  high     |   Milestone:         
 Component:  postgis  |     Version:  2.1.x  
Resolution:  invalid  |    Keywords:         
----------------------+-----------------------------------------------------
Changes (by pramsey):

  * status:  new => closed
  * resolution:  => invalid


Comment:

 Your longitude and latitude are reversed, unless your office happens to be
 near the South pole. Use
 {{{
 SELECT
 ST_DISTANCE(st_geographyfromtext('POINT(-83.008314 39.982708)'),
 st_geographyfromtext('POINT(-83.014097 39.983736)')) as "office to
 harrisons",
 ST_DISTANCE(st_geographyfromtext('POINT(-83.008314 39.982708)'),
 st_geographyfromtext('POINT(-83.010781 39.968347)')) as "office to
 clippers"
 }}}

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