Opened 16 years ago

Closed 16 years ago

Last modified 15 years ago

#1157 closed bug (fixed)

incorrect loading and band management of 2-band rasters

Reported by: gislab Owned by: ersts
Priority: major: does not work as expected Milestone:
Component: Rasters Version: Trunk
Keywords: Cc:
Must Fix for Release: Yes Platform: All
Platform Version: Awaiting user input: no

Description

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

  1. Band selectors in raster properties act weird, try this:
  2. add 2-band raster to qgis
  3. go to layer properties, band selectors
  4. 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 (3)

translation.gif (23.8 KB ) - added by gislab 16 years ago.
subset.zip (5.3 KB ) - added by gislab 16 years ago.
vizual.gif (106.4 KB ) - added by gislab 16 years ago.

Download all attachments as: .zip

Change History (12)

by gislab, 16 years ago

Attachment: translation.gif added

by gislab, 16 years ago

Attachment: subset.zip added

comment:1 by gislab, 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

comment:2 by timlinux, 16 years ago

Milestone: Version 0.11.0Version 1.0.0
Owner: changed from nobody to ersts

comment:3 by msieczka, 16 years ago

Must Fix for Release: NoYes
Platform: WindowsAll
Priority: minor: annoyance or enhancementmajor: does not work as expected
Type: defectbug
Version: 0.10.0HEAD

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.

comment:4 by ersts, 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!

in reply to:  4 ; comment:5 by msieczka, 16 years ago

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 comment:6 by ersts, 16 years ago

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.

comment:7 by gislab, 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).

by gislab, 16 years ago

Attachment: vizual.gif added

comment:8 by ersts, 16 years ago

Resolution: fixed
Status: newclosed

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

comment:9 by (none), 15 years ago

Milestone: Version 1.0.0

Milestone Version 1.0.0 deleted

Note: See TracTickets for help on using tickets.