Ticket #1157 (closed bug: fixed)

Opened 1 year ago

Last modified 1 year ago

incorrect loading and band management of 2-band rasters

Reported by: gislab Assigned to: ersts
Priority: major: does not work as expected Milestone: Version 1.0.0
Component: Rasters Version: HEAD
Keywords: Cc:
Platform Version: Platform: All
Must Fix for Release: Yes Awaiting user input: 0

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.

Attachments

translation.gif (23.8 kB) - added by gislab on 07/15/08 18:59:42.
subset.zip (5.3 kB) - added by gislab on 07/15/08 19:00:12.
vizual.gif (106.4 kB) - added by gislab on 07/16/08 12:03:10.

Change History

07/15/08 18:59:42 changed by gislab

  • attachment translation.gif added.

07/15/08 19:00:12 changed by gislab

  • attachment subset.zip added.

07/15/08 19:03:17 changed by gislab

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

07/15/08 19:36:47 changed by timlinux

  • owner changed from nobody to ersts.
  • milestone changed from Version 0.11.0 to Version 1.0.0.

07/16/08 10:52:33 changed by msieczka

  • priority changed from minor: annoyance or enhancement to major: does not work as expected.
  • platform changed from Windows to All.
  • version changed from 0.10.0 to HEAD.
  • type changed from defect to bug.
  • must_fix changed from No to Yes.

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.

(follow-up: ↓ 5 ) 07/16/08 11:12:42 changed by ersts

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!

(in reply to: ↑ 4 ; follow-up: ↓ 6 ) 07/16/08 11:25:17 changed by msieczka

Replying to 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?

(in reply to: ↑ 5 ) 07/16/08 11:33:57 changed by ersts

Replying to msieczka:

Replying to 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.

07/16/08 12:02:56 changed by gislab

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).

07/16/08 12:03:10 changed by gislab

  • attachment vizual.gif added.

07/20/08 21:47:10 changed by ersts

  • status changed from new 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