This is a cross-post from 
https://gis.stackexchange.com/questions/278774/variable-substitution-in-sld-for-geoserver-2-13-rastersymbolizer-channelselectio
 as I was told that this may be a better place to ask this question:

I'm trying to publish a layer with a style that allows the extended WMS request 
to specify what image bands to map to the RGB values. Based on existing 
examples I assumed that my SLD should have something like the following 
RasterSymbolizer element:

<RasterSymbolizer>
        <ChannelSelection>
          <RedChannel>
            <SourceChannelName>
              <ogc:Function name="env">
               <ogc:Literal>redchan</ogc:Literal>
               <ogc:Literal>1</ogc:Literal>
              </ogc:Function>
            </SourceChannelName>
          </RedChannel>...

But the SLD validation fails with the following error:

Element 'SourceChannelName' is a simple type, so it must have no element 
information item [children]

I am following this documentation:

http://docs.geoserver.org/stable/en/user/styling/sld/reference/rastersymbolizer.html
 
http://docs.geoserver.org/stable/en/user/styling/sld/extensions/substitution.html

Is there a way to do this or is it not supported for the ChannelSelection 
element? Are there any more examples and/or documentation for SLD variable 
substitution that I can look at?

Thanks,
Shahin

This electronic correspondence, including any attachments, is intended solely 
for the use of the intended recipient(s) and may contain legally privileged, 
proprietary and/or confidential information. If you are not the intended 
recipient, please immediately notify the sender by reply e-mail and permanently 
delete all copies of this electronic correspondence and associated attachments. 
Any use, disclosure, dissemination, distribution or copying of this electronic 
correspondence and any attachments for any purposes that have not been 
specifically authorized by the sender is strictly prohibited.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this 
list:
- Earning your support instead of buying it, but Ian Turton: 
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: 
http://geoserver.org/comm/userlist-guidelines.html

If you want to request a feature or an improvement, also see this: 
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to