Bug report #4167

multi-band gray-scale raster style forgets band selection on edit

Added by Bill Clay over 13 years ago. Updated over 12 years ago.

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

Description

QGIS 1.7.0 w/ Qt 4.6.2; raster layer with "style" tab "render as" field set to "single band gray" and "Color map" field set to "colormap". If properties of raster layer are opened and saved (even with no changes), the selected band number on the "style" and "colormap" tabs resets to 1. Desired band number (other than 1) must be manually re-entered on both tabs before every properties save. (Initial project open retrieves band number correctly.)

gdalinfo output for sample file experiencing issue:

Driver: GTiff/GeoTIFF
Files: cover-48.tif
cover-48.tif.aux.xml
Size is 4675, 2976
Coordinate System is:
PROJCS["US National Atlas Equal Area",
GEOGCS["Unspecified datum based upon the Clarke 1866 Authalic Sphere",
DATUM["Not_specified_based_on_Clarke_1866_Authalic_Sphere",
SPHEROID["Clarke 1866 Authalic Sphere",6370997,0,
AUTHORITY["EPSG","7052"]],
AUTHORITY["EPSG","6052"]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433],
AUTHORITY["EPSG","4052"]],
UNIT["metre",1,
AUTHORITY["EPSG","9001"]],
AUTHORITY["EPSG","2163"]]
Origin = (-2095000.000000000000000,798000.000000000000000)
Pixel Size = (1000.000000000000000,-1000.000000000000000)
Metadata:
AREA_OR_POINT=Area
Image Structure Metadata:
INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left (-2095000.000, 798000.000)
Lower Left (-2095000.000,-2178000.000)
Upper Right ( 2580000.000, 798000.000)
Lower Right ( 2580000.000,-2178000.000)
Center ( 242500.000, -690000.000)
Band 1 Block=64x64 Type=Byte, ColorInterp=Gray
NoData Value=255
Band 2 Block=64x64 Type=Byte, ColorInterp=Undefined
NoData Value=255

History

#1 Updated by Goyo D over 13 years ago

Seems lika a duplicate of bug #4138
#4138

#2 Updated by Alister Hood about 13 years ago

Only the problem on the "style" tab is a duplicate.
Bill provided a patch on #4138 to fix "the selected band number on the style tab" resetting to 1.
It looks to me like quite a lot more work would be needed to fix "the selected band on the Color map tab" resetting to 1.

#3 Updated by Thaddeus - about 13 years ago

The Classify option under the Colormap tab does not reflect the selected band either (QGIS1.7.1), no closing & opening windows involved here, just setting a band number and pressing Classify (tried different band numbers under Style & Colormap tabs).

#4 Updated by Giovanni Manghi about 13 years ago

  • Target version set to Version 1.7.4

#5 Updated by Sandro Santilli almost 13 years ago

  • Affected QGIS version set to master
  • Crashes QGIS or corrupts data set to No

If you landed here following a reference in a commit log (a646ff6f00ff0bd7f9bdf33bd174ca08a4123f9b) be warned that the correct reference for that commit was ticket #4788 instead.

#6 Updated by Paolo Cavallini over 12 years ago

  • Target version changed from Version 1.7.4 to Version 1.8.0

#7 Updated by Giovanni Manghi over 12 years ago

  • Resolution set to duplicate
  • Status changed from Open to Closed

duplicate of #4138

Also available in: Atom PDF