[QGIS-trac] [Quantum GIS] #3586: use authid instead of proj.4
strings
Quantum GIS
qgis at qgis.org
Wed Mar 9 15:57:55 EST 2011
#3586: use authid instead of proj.4 strings
------------------------------------------------+---------------------------
Reporter: jef | Owner: jef
Type: patch | Status: new
Priority: major: does not work as expected | Milestone: Version 1.7.0
Component: Projection Support | Version:
Keywords: | Platform_version:
Platform: All | Must_fix: No
Status_info: 0 |
------------------------------------------------+---------------------------
Currently we try to use the proj.4 strings to store references to
coordinate
systems (eg. for the default project crs). Unfortunately the proj.4
string isn't unique in our database:
{{{
sqlite> select count(*),parameters from tbl_srs group by parameters order
by count(*) desc limit 10;
54|+proj=longlat +ellps=intl +no_defs
27|+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs
21|+proj=longlat +ellps=clrk80 +no_defs
17|+proj=longlat +ellps=bessel +no_defs
15|+proj=longlat +ellps=clrk66 +no_defs
13|+proj=longlat +a=6378249.2 +b=6356515 +no_defs
11|+proj=longlat +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +no_defs
9|+proj=longlat +ellps=GRS80 +no_defs
9|+proj=longlat +ellps=krass +no_defs
9|+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=500000 +y_0=0 +ellps=krass
+units=m +no_defs
sqlite> select auth_name,auth_id,description,parameters from tbl_srs where
parameters='+proj=longlat +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +no_defs'
limit 1;
EPSG|4148|Hartebeesthoek94|+proj=longlat +ellps=WGS84
+towgs84=0,0,0,0,0,0,0 +no_defs
}}}
So selecting 'EPSG:4326' as default CRS results in 'EPSG:4148 -
Hartebeesthoek94' - which obviously is irritating.
The attached patch switches to the use of authid instead of proj.4
strings. Any objections to commit it for 1.7?
--
Ticket URL: <http://trac.osgeo.org/qgis/ticket/3586>
Quantum GIS <http://qgis.org>
Quantum GIS is an Open Source GIS viewer/editor supporting OGR, PostGIS, and GRASS formats
More information about the QGIS-trac
mailing list