Bug report #10090

GDAL handling of file extensions in Windows 7 in QGIS 2.2

Added by nigel malcolm about 10 years ago. Updated over 5 years ago.

Affected QGIS version:2.2.0 Regression?:No
Operating System:Windows Easy fix?:No
Pull Request or Patch supplied:No Resolution:end of life
Crashes QGIS or corrupts data:No Copied to github as #:18558


I have noted the following behaviour when undertaking batch processing of raster files in QGIS 2.2 on Windows 7 Professional.

Assign Projection
When reprojecting ECWs using menu item 'Raster > Projections > Assign projection' the ECWs are overwritten with the GeoTiffs produced by GDAL but the file extensions are not affected, i.e. the ECWs change from 3Mb files to approximately 30Mb files and can,'t be added to QGIS. If I then manually change the file extensions to .TIF then they can be added to QGIS and are in the newly assigned projection.

Translate (Convert format)
I have also noted the same behaviour when translating to a different file format; using menu item 'Raster > Conversion > Translate (Convert format)'. Given the size of the GeoTiffs created above, I attempted to reduce the size of the tiles by batch translating them to JPEGs. Again the file sizes changed but the extensions remained the same and became unreadable by QGIS. Upon manually changing the file extensions from .TIF to .JPEG they became readable.

I investigated a bit further and this behaviour seems to relate to the default setting in windows 'Folder Options' to 'Hide extensions of known file types'. If this is enabled (the default setting in windows) then GDAL appears to ignore the file extensions. If I disable the setting, so file extensions are not hidden then GDAL appears to operate correctly, creating new versions of the files with the correct file extensions.


#1 Updated by Jürgen Fischer almost 10 years ago

  • Target version changed from Version 2.2 to Future Release - Lower Priority

#2 Updated by Giovanni Manghi about 7 years ago

  • Easy fix? set to No
  • Regression? set to No

#3 Updated by Giovanni Manghi over 5 years ago

  • Resolution set to end of life
  • Status changed from Open to Closed

Also available in: Atom PDF