[QGIS-trac] Re: [Quantum GIS] #1079: on the fly projections do not work

Quantum GIS qgis at qgis.org
Sun Aug 31 05:15:30 EDT 2008


#1079: on the fly projections do not work
--------------------------------------------------------------+-------------
        Reporter:  pcav                                       |         Owner:  mhugent      
            Type:  defect                                     |        Status:  reopened     
        Priority:  critical: causes crash or data corruption  |     Milestone:  Version 1.0.0
       Component:  Projection Support                         |       Version:  HEAD         
      Resolution:                                             |      Keywords:  srs.db datum 
Platform_version:                                             |      Platform:  All          
        Must_fix:  Yes                                        |   Status_info:  1            
--------------------------------------------------------------+-------------
Comment (by neteler):

 Replying to [comment:19 msieczka]:
 > Replying to [comment:16 neteler]:
 > > I confirm that QGIS does not understand data in a GRASS location with
 towgs parameter:
 > >
 > > {{{
 > > Warning: QgsCoordinateReferenceSystem::getRecord failed :  select *
 from tbl_srs where
 > > parameters='+proj=tmerc +lat_0=0 +lon_0=9 +k=0.9996 +x_0=1500000
 +y_0=0 +ellps=intl
 > > +towgs84=-104.1,-49.1,-9.9,0.971,-2.917,0.714,-11.68 +units=m
 +no_defs'
 > > <snip>
 > > }}}
 >
 > QGIS doesn't recognize this CRS, because epsg_tr.py (a GDAL utility,
 used in the QGIS CRS database creation script) will not create an exactly
 the same string for any EPSG code. I checked that with all EPSG codes
 against my GDAL 1.5.2 instalation. Markus, what EPSG code is this proj4
 string supposed to represent?

 GRASS 6.4.svn (pat):~ > g.proj -j | tr '\n' ' '
 +proj=tmerc +lat_0=0.0000000000 +lon_0=9.0 +k_0=0.9996000000
 +x_0=1500000.0000000000 +a=6378388 +rf=297 +no_defs
 +towgs84=-104.1,-49.1,-9.9,0.971,-2.917,0.714,-11.68 +to_meter=1

 It is EPSG 3003 + towgs84 (since PROJ4's epsg file still omits towgs84
 when multiple datums are available as in many European countries).

 > > Since GDAL considers this projection '''valid''', it must  be a QGIS
 problem. I take
 > > liberty to reopen the ticket.
 >
 > True, the CRS definition is valid, in general, according to testepsg
 (another GDAL utility), yet it is not an exact representation of any EPSG
 code according to GDAL, as checked with epsg_tr.py.
 >
 > Looks like the bottom line of the problem is that QGIS uses an overly
 strict CRS matching. QGIS should support any CRS definition that GDAL
 considers valid, not only those which are exact equivalents of some EPSG
 codes.

 Right. Currently it is a showstopper which renders QGIS' on the fly
 projection unusable as I cannot afford shifts of >100m just due to the
 omission of towgs84.

 > QGIS devs - can it? The testepsg from GDAL seems to provide the required
 functionality.

 to compile that:
 {{{
 cd gdal/apps/
 make testepsg
 }}}

-- 
Ticket URL: <http://trac.osgeo.org/qgis/ticket/1079#comment:21>
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