Default Raster Visualization

Issue #166 closed
Benjamin Jakimow created an issue

The default rendering of raster layers should consider the following options:

#bands byte int float
1 DN 2% GC 2% GC
2 DN 2% GC 2% GC
>= 3 DN 2% RGB 2% RGB

2% RGB = QgsMultiBandColorRenderer with default or, if possible, True Color band combination from 2% to 98 % (band-wise)

2% GC = QgsSingleBandGrayRenderer grey color gradient from 2% to 98%

DN = direct use of digital number as RGB color values

QgsPalettedRasterRenderer in case of ClassificationScheme

Comments (8)

  1. Andreas Janz

    we do not need the table, use this logic:

    #!
    
    if bands=3 and type=byte: 
        strech=DN
    elif bands=1:
        if type=byte: 
            strech=0% GC
        else:
            stretch=2% GC
    else: 
        strech=2% RGB
    
  2. Benjamin Jakimow reporter

    The table is needed to support documentation of EnMAP-Box behaviour for none-programmers. I updated it with your logic.

  3. Andreas Janz

    following the given if-elif-else logic, it is more like this

    #bands byte int / float
    1 0% GC 2% GC
    3 DN 2% RGB
    else 2% RGB 2% RGB
  4. Log in to comment