Uploaded image for project: 'GeoServer'
  1. GEOS-8131

Layer Group SLD ChannelSelection issue

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: 2.11.0
    • Fix Version/s: 2.10.4, 2.11.2
    • Component/s: WMS
    • Labels:
      None
    • Environment:

      Windows 10
      Tomcat 7.0.72
      JDK 1.8.0_101

      Description

      Dear All,

      I have an Imagemosaic Layer with 4 Bands with RGB band-combination 3,2,1. I have an SLD style (name=truecolor) set up with <ChannelSelection><Red/Blue/GreenChannel>.

      This Layer is displayed correctly when opening the WMS link, but when its within a Layer Group, the Band combination set in the SLD is not used, instead its the same output as using "style=raster", which makes an RGBA out of it.

      Of course I set the style in the Layer Group correctly.

      The log says:
      Styles = [StyleImpl[ name=truecolor], StyleImpl[ name=raster_scale_dependent]]

      There is no Error message.

      The SLD style (name=truecolor):

       <?xml version="1.0" encoding="UTF-8"?>
      <StyledLayerDescriptor xmlns="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/sld
      http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd" version="1.0.0">
        <NamedLayer>
          <Name></Name>
          <UserStyle>
            <FeatureTypeStyle>    
              <Rule>
                <Name>Raster RGB</Name>
                <MaxScaleDenominator>1E06</MaxScaleDenominator>
                <RasterSymbolizer>            
                  <Opacity>1.0</Opacity>
                  <ChannelSelection>
                    <RedChannel>
                      <SourceChannelName>3</SourceChannelName>
                    </RedChannel>
                    <GreenChannel>
                      <SourceChannelName>2</SourceChannelName>
                    </GreenChannel>
                    <BlueChannel>
                      <SourceChannelName>1</SourceChannelName>
                    </BlueChannel>
                  </ChannelSelection>
                </RasterSymbolizer>
              </Rule>
            </FeatureTypeStyle>
          </UserStyle>
        </NamedLayer>
      </StyledLayerDescriptor>
      

      Steps to reproduce (via Interface):

      1. Add the quicklook file as GeoTiff Store and Publish with style=raster.
      2. Put the fullres file into a folder and add the folder as Imagemosaic, publish with the style from above.
      3. Create a LayerGroup and add these 2 Layers.
      4. Preview Layers individually * => works as expected.
      5. Preview LayerGroup * => Channel Selection from SLD for the Imagemosaic is not working, showing the Layer as RGBA.

      • fullres layer is shown only at scale < 1.000.000

      All Settings left default.
      Tested on blank GeoServer 2.11.0

        Attachments

          Issue links

            Activity

              People

              • Assignee:
                aaime Andrea Aime
                Reporter:
                tdipisa Tobia Di Pisa
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: