Bug report #9460

gdaltools relies on gdalinfo for raster SRS and extent, should use python API

Added by Etienne Tourigny almost 11 years ago. Updated almost 11 years ago.

Status:Closed
Priority:Low
Assignee:Etienne Tourigny
Category:-
Affected QGIS version:2.0.1 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:Yes Resolution:fixed/implemented
Crashes QGIS or corrupts data:No Copied to github as #:18052

Description

GdalTools should rely on commandline tools only for complex operations, not basic dataset info.

The SRS and extent query methods rely on gdalinfo, which is fragile as reported by Even Rouault:

#d63104ae50dcd45ddf50dfe31ea6803530a64b26#commitcomment-5218484

Just an outsider point of view : why using GDAL utilties and risky output parsing to get the SRS and not just plain Python GDAL API...

I have a pull request to fix this, but I am hesitant to apply this to master now. Any input would be appreciated.

Associated revisions

Revision 58faa5b4
Added by Giuseppe Sucameli almost 11 years ago

Merge pull request #1129 from etiennesky/gdaltools_fixes2

gdaltools: use GDAL python bindings to get raster SRS and extent (fix #9460)

History

#2 Updated by Giuseppe Sucameli almost 11 years ago

  • Status changed from Open to Closed

#3 Updated by Giuseppe Sucameli almost 11 years ago

  • Resolution set to fixed/implemented

Merged, thanks Etienne.

Also available in: Atom PDF