Bug report #1157

incorrect loading and band management of 2-band rasters

Added by Maxim Dubinin over 16 years ago. Updated about 15 years ago.

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

Description

I. On load, 2 band raster doesn't show up (should've load 2-1-1 or 2-2-1 on default? btw; having setting for band order to load on default will make work with multiple images so much easier).

II. After changing band order in raster properties it shows up (band names show up as grey and undefined, I suppose band 1 and band 2 will be more straightforward).

but
III. Band selectors in raster properties act weird, try this:
1. add 2-band raster to qgis
2. go to layer properties, band selectors
3. click on the third one (blue) - only "2: undefined" and "not set" shows up, why not "1: gray" also?

I can provide an example raster if needed.

translation.gif (23.8 KB) Maxim Dubinin, 2008-07-15 03:59 PM

subset.zip (5.29 KB) Maxim Dubinin, 2008-07-15 04:00 PM

vizual.gif (106 KB) Maxim Dubinin, 2008-07-16 09:03 AM

History

#1 Updated by Maxim Dubinin over 16 years ago

translation.gif - also regarding III, changing the bands in the band selector sometimes lead to totally weird results, on the attachement, notice blue band band selector, first item - translated, second - "2: undefined", third - not translated

#2 Updated by Maciej Sieczka - over 16 years ago

I confirm the issue in 0.11 on GNU/Linux as well. In general - multiband imagery with 2 bands only are displayed blank. In raster properties only RED and GREEN are assigned - one needs to manually choose the BLUE band from the 2 available to see anything.

However, the issue III from the orginal bug report is gone now.

#3 Updated by ersts - over 16 years ago

Providing an example would be great!

This happens because if any channel is set to "No Set" the rending process is actually totally skipped.

Defaulting to 122/RGB would be very simple. But in my mind the question is, is it more appropriate automatically display 2-band images as gray scale images rather than RBG?

I personally have never had the need for a 2-band image, and cannot come up with a situation where one would be needed, let alone displaying them in color. Can you provide a short description of how you are using these 2-band data?

Thanks!

#4 Updated by Maciej Sieczka - over 16 years ago

Replying to [comment:4 ersts]:

Providing an example would be great!

There is, attached to the ticket.

I personally have never had the need for a 2-band image, and cannot come up with a situation where one would be needed, let alone displaying them in color.

I can't speak for the report's author, but as to me - since QGIS allows to load such data, it should handle them somehow, shouldn't it?

#5 Updated by ersts - over 16 years ago

Replying to [comment:5 msieczka]:

Replying to [comment:4 ersts]:

Providing an example would be great!

There is, attached to the ticket.

Yes, so there is, looked at the screen shot but not the other file.

I personally have never had the need for a 2-band image, and cannot come up with a situation where one would be needed, let alone displaying them in color.

I can't speak for the report's author, but as to me - since QGIS allows to load such data, it should handle them somehow, shouldn't it?

Sure it should! Looking at the example image, I think it would be better to load this as gray scale rather than force 122/RGB.

#6 Updated by Maxim Dubinin over 16 years ago

Hi, I'm glad this received some attention. Ability to work with 2-band rasters in RGB mode is as important as with normal 3-band rasters, as this helps visual interpretation.

Just to give you an example. I'm working with lots of MODIS data which has 2 bands of 250 m (and some others, but only 2 with this res), I have the whole production system based on such composites created from these bands and I do want to see them in color even though one of the band is "missing".

I've attached an example of what it would look like (2-1-1), if I have an ability to put 2nd (infrared) band in R-gun and 1st in G and B. I have rather convenient (I'd even say traditional) way to visualize (i.e. vegetation is red as it supposed to be).

#7 Updated by ersts - over 16 years ago

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

Band names will be generic from now on to avoid confusion.

I also added an ability to set the default band combinations which will be persistent between QGIS sessions

#8 Updated by Anonymous about 15 years ago

Milestone Version 1.0.0 deleted

Also available in: Atom PDF