Select bands for false color composite in Spectral viewer

Issue #700 resolved
Agustin Lobo created an issue

It would be very handy being able to right-click on the spectrum and select that band for false color display or haveing 3 vertical color (red, green, blue) lines marking the actual bands being displayed and leting the user move them to modify the false color display.

Comments (26)

  1. Andreas Janz

    Not sure if this is conceptually easy to implement, because spectral and map views are not liked 1 to 1.

    @Benjamin Jakimow , maybe we can enhance the Raster Band selection dialog showing a single profile (e.g. vegetation) and the 3 verticle lines?

  2. Agustin Lobo reporter

    I understand. But at least it should be possible to identify the band numbers in the spectral plot. I have used Import/PRISMA and the resulting geotif does not have wavelength information, just band number (actually, layer number: the original band numbers would not be kept if the user deletes some bands).

    Also, I do not understand the Raster Band panel: I click Apply and/or ok and the display does not change.

    In the case of importing the PRISMA image as BSQ, the hdr file includes the wavelength info, but qgis seems to stick to the Band names (which are just Band numbers), and the Raster Band panel is:

  3. Andreas Janz

    Also, I do not understand the Raster Band panel: I click Apply and/or ok and the display does not change

    This is a known bug. @Benjamin Jakimow , I can’t find the related issue, was that resolved already?

  4. Andreas Janz

    I have used Import/PRISMA and the resulting geotif does not have wavelength information, just band number (actually, layer number: the original band numbers would not be kept if the user deletes some bands).

    Also sounds like a bug. Imported PRISMA raster should have wavelength information. I come back to you via email for further discussion.

  5. Andreas Janz

    I can’t reproduce the problem with the current dev version that will be released in 3 weeks. Imported PRISMA raster has wavelength and the RGB buttons are also working.

  6. Andreas Janz

    Also, are you really sure, that your result has no wavelength? If so, the buttons should be disable, e.g.:

    In your screenshot, the buttons seam to be enabled.

    Have you checked the GDAL Metadata for wavelength information?

  7. Agustin Lobo reporter

    Yes, I do have the wavelength information in the GDAL Metadata panel and the buttons of the Raster Band panel are active, but the wavelength info is not displayed in either the Rasr Bands or the Symbology panels:

    In your scrrenshot of the Raster Band panle, the wavelength info is displayed for each band, which facilitates selecting the bands for the color composite. I’m using Version 3.8.20210531T154729.TEST

  8. Andreas Janz

    Yes, I do have the wavelength information in the GDAL Metadata panel and the buttons of the Raster Band panel are active, but the wavelength info is not displayed in either the Rasr Bands or the Symbology panels:

    I think you have a point here.

    1. @jakimowb I think we should display wavelength information in the Raster Band dialog
    2. When importing products (PRISMA, DESIS, EnMAP, Landsat, Sentinel etc.) or spectrally resample a raster into a new Sensor, I will include the wavelength into the band names.

  9. Agustin Lobo reporter

    Yes, I can change the units ans see either nm or band index, but this is still inconvenient: you check the wl on the spectrum, but then to see which is the corresponding band you have to leave the spectrum to select Band Index and then you cannot go back to the same point in the spectrum.

    What I’m after is for a fast way of selecting band to be displayed according to the info I see in the spectrum. I think there should be some way to always see the band index, perhaps just along the xy coordinates, eg.

    x: 1654.67820 (band 142) y: 3460.21079

  10. Andreas Janz

    Maybe there is a way to achieve this.

    Like you suggested, we should have RGB bars in the spectral view, that can be dragged around:

    Now we need a new entry like “Apply Spectral Library RGB Bands“ in the Data Views context menu:

    This sets the appropriate bands to the layer style and perhaps also re-applies the data stretch at the same time.

  11. Agustin Lobo reporter

    Yes, except that note that the correct way of visualizing the spectra is with wavelength in X (not all systems cover the spectral range uniformly), so it is important to see the shape with the X axis in wavelength. And somehow get the band number for the selected positions. Printing the band nb along the xy of the spectrum (x: 1654.67820 (band 142) y: 3460.21079 ) should be very simple and useful.

  12. Andreas Janz

    Yes, except that note that the correct way of visualizing the spectra is with wavelength in X (not all systems cover the spectral range uniformly), so it is important to see the shape with the X axis in wavelength. And somehow get the band number for the selected positions. 

    Yes, that should of course work with wavelength in X. The proper band numbers for the raster layer can be derived internally.

    But, this feature should also work for band numbers in X. In this case, the selected band numbers are assigned directly.

    Thanks Agus!

  13. Agustin Lobo reporter

    I cannot find the way to select the bands for false color composites in the Spectral viewer

  14. Andreas Janz

    Currently you can’t select predefined RGB band combinations like FalseColor inside the Spectral viewer.

    I plan to add a list of predefined RGB band combinations to the newly implemented Waveband Locator panel:

    See #895 for details.

  15. Agustin Lobo reporter

    I cannot find the way to select the bands for false color composites in the Spectral viewer

    I was not using the dev version.

  16. Agustin Lobo reporter

    Cannot find any info related to the different options for composites in the GEE DC plugin.

    I think EnMapBox should provide the actual reference(s) for these options.

  17. Andreas Rabe

    Cannot find any info related to the different options for composites in the GEE DC plugin.

    You mean the GEE Time Series Explorer?

    If so, no, this list of predefined RGB visualizations isn’t implemented yet.
    But yes, makes totally sense to have that.
    Please open a new issue for that.

  18. Andreas Rabe

    I think EnMapBox should provide the actual reference(s) for these options.

    Agreed, please open a new issue for that.

    AFAIK, this list is not really advertised. I found it in the source code of the Google Earth Engine Data Catalog plugin.

    But anyways, we can still reference to that file. Better than nothing.

  19. Log in to comment