Bug report #17941

All geogcs names imported from GDAL/PROJ are wrongly set to "Imported from GDAL"

Added by Andrea Giudiceandrea over 6 years ago. Updated over 6 years ago.

Category:Projection Support
Affected QGIS version:2.18.16 Regression?:No
Operating System:Windows 7 SP1 64 bit Easy fix?:Yes
Pull Request or Patch supplied:Yes Resolution:fixed/implemented
Crashes QGIS or corrupts data:Yes Copied to github as #:25837


QGIS 2.8.16 64 bit (but also in master) on Windows 7 SP1 64 bit

During postintall procedures, crssync.exe runs in order to synchronize CRS database with GDAL/PROJ definitions: while new projected coordinate systems names are properly imported in srs.db, new geographical coordinate systems names are all (338) set to "Imported from GDAL" also when they have a name.

The bug is caused by a typo ("GEOCS" instead of "GEOGCS")in QgsCoordinateReferenceSystem::syncDb()

QString name( OSRIsGeographic( crs ) ? OSRGetAttrValue( crs, "GEOCS" "GEOGCS", 0 ) : OSRGetAttrValue( crs, "PROJCS", 0 ) );
if ( name.isEmpty() )
name = QObject::tr( "Imported from GDAL" );

Associated revisions

Revision c91e33d3
Added by Andrea Giudiceandrea over 6 years ago

Fixes a typo in syncDb()

Fixes a typo in QgsCoordinateReferenceSystem::syncDb() that improperly set "Imported from GDAL" as name for all geographical coordinate systems imported from GDAL/PROJ definitions during postintall CRS database synch.

Fixes #17941


#1 Updated by Andrea Giudiceandrea over 6 years ago

Pull request with commit that fixes the bug: https://github.com/qgis/QGIS/pull/6153

#2 Updated by Andrea Giudiceandrea over 6 years ago

  • % Done changed from 0 to 100
  • Status changed from Open to Closed

#3 Updated by Giovanni Manghi over 6 years ago

  • Resolution set to fixed/implemented

Also available in: Atom PDF