[postgis-devel] [PostGIS] #1230: _ST_BestSRID should not return negative SRID values

PostGIS trac at osgeo.org
Thu Oct 6 07:56:58 PDT 2011


#1230: _ST_BestSRID should not return negative SRID values
---------------------+------------------------------------------------------
 Reporter:  strk     |       Owner:  pramsey      
     Type:  defect   |      Status:  new          
 Priority:  high     |   Milestone:  PostGIS 2.0.0
Component:  postgis  |     Version:  trunk        
 Keywords:           |  
---------------------+------------------------------------------------------
Changes (by strk):

  * priority:  medium => high
  * version:  1.5.X => trunk


Comment:

 Found the hole being in libpgcommon:

 {{{
 /**
 *  Given an SRID, return the proj4 text. If the integer is less than zero,
 *  and one of the "well known" projections we support
 *  (WGS84 UTM N/S, Polar Stereographic N/S), return the proj4text
 *  for those.
 */
 static char* GetProj4String(int srid)
 }}}

 The function basically supports magic numbers with constant proj4text
 strings to save lookups in spatial_ref_sys.

 I don't know what's the best way to handle this. We might always skip the
 lookup for those numbers, would it be acceptable ?

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