[Qgis-developer] script to update the srs.db

Marco Hugentobler marco.hugentobler at karto.baug.ethz.ch
Mon Jun 23 09:53:32 EDT 2008

Am Montag 23 Juni 2008 15:34:48 schrieb Maciej Sieczka:
> Marco Hugentobler pisze:
> > Unfortunately, I found some more occurences of GEOSRS_ID in the code.
> So I understand we must preserve the original QGIS srsids, at least for
> now - for the reason above and due to the fact there might be SRSs
> present which are not included in EPSG database, as Tim mentioned -
> right? If so, I'll modify the script to achieve this. Not today, maybe
> tomorrow.

I think we must not preserve all srsids. For now it is only necessary to 
insert the srsid value for wgs84 into qgis.h:

const long GEOSRS_ID = 2585; -> const long GEOSRS_ID = <new_wgs84_srs_id>;

And on my todo list is some coding that we don't need to change this line 
everytime the srs.db is updated.

In nearly all cases, QGIS handles the srs with the proj4 string (exceptions 
are some cases where QGIS needs a default crs and there is no default crs in 
project file). So I don't think it is necessary to preserve the old srs ids.


> As to the "lonlat" vs "longlat" - AFAICS from my testing of gdalwarp and
> gdaltransform, GDAL (1.5.2) does not support the shorter form - they
> throw an error:
> ERROR 1: Translating source or target SRS failed:
> +proj=latlon +ellps=WGS84 +datum=WGS84 +no_defs
> This means we should stick to the old "longlat" name in QGIS. Although
> PROJ.4 defaults to the shorter "lonlat" these days, I verified it at
> least supports both forms, so this should not be a problem.
> Maciek

Dr. Marco Hugentobler
Institute of Cartography
ETH Zurich
Technical Advisor QGIS Project Steering Committee

More information about the Qgis-developer mailing list