Bug report #17103

QgsRasterFileWriter fails to export raster into a geopackage

Added by Alessandro Pasotti about 7 years ago. Updated about 7 years ago.

Status:Closed
Priority:Normal
Assignee:Even Rouault
Category:Rasters
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:25002

Associated revisions

Revision c3e15f52
Added by Even Rouault about 7 years ago

[GDAL provider] in create(), use newly create dataset handle to instanciate the provider (fix #17103)

Previously we created an empty file, close it and re-opened it immediately in open mode.
However for GeoPackage, if you create for example a 1 band or 3 band dataset, upon reopening
you get a 4 band RGBA dataset, due to the fact that GeoPackage doesn't explicitly store the
number of bands. Thus the 4th band (alpha) was never written by the QgsRasterFileWriter logic.

Revision d00efde2
Added by Even Rouault about 7 years ago

Merge pull request #5580 from rouault/fix_QgsRasterFileWriter_geopackage

[GDAL provider] in create(), use newly create dataset handle to instanciate the provider (fix #17103)

History

#1 Updated by Even Rouault about 7 years ago

  • Assignee set to Even Rouault

#2 Updated by Even Rouault about 7 years ago

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

Also available in: Atom PDF