[postgis-devel] [PostGIS] #1243: ST_Distance_Sphere regress failure

PostGIS trac at osgeo.org
Fri Oct 14 04:56:29 PDT 2011

#1243: ST_Distance_Sphere regress failure
 Reporter:  robe     |       Owner:  pramsey      
     Type:  defect   |      Status:  new          
 Priority:  medium   |   Milestone:  PostGIS 2.0.0
Component:  postgis  |     Version:  trunk        
 Keywords:           |  
 I'm pretty sure I've tested my tiger geocoder in earlier versions of
 PostGIS 2.0, so I suspect this is a new regression failure.

 My tiger_geocoder reverse geocoder regressions are failing now.

 I isolated it to this issue.  In my 1.5.3 build this works:

  SELECT ST_Distance_Sphere(ST_GeomFromText('LINESTRING(-93.225708

 In 2.0 -- it no longer does and gives a:

 ERROR:  Only SRID 4326 is currently supported in geography.

 The unknown case still works however so not a super big deal:

  SELECT ST_Distance_Sphere(ST_GeomFromText('LINESTRING(-93.225708
 44.944981,-93.2257 44.94317)',-1),ST_Point(-71.27593,42.33891));

 Prior versions used to assume WGS84 (4326) for the geometries I think and
 not consider the SRIDs at all. I don't care too much about the tiger
 gecoder case since that is an easy fix for me to patch, but I fear it will
 break other people's code used to using census data and not realizing the
 srid is 4269 (which for all intents and purposes is the same as 4326
 except its the answer to life and sex under one roof).  That could make a
 lot of Americans mad.  You don't want to know what happens when Americans
 get mad :).

Ticket URL: <http://trac.osgeo.org/postgis/ticket/1243>
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-devel mailing list