1

I'm trying to create a sld style for my raster, but I'm getting this error :

line 18: cvc-complex-type.2.1 : L'élément 'sld:Normalize' ne doit comporter aucun enfant ([children]) de type caractère ou élément d'information, car le type de contenu du type est vide.
line 28: cvc-complex-type.2.1 : L'élément 'sld:Normalize' ne doit comporter aucun enfant ([children]) de type caractère ou élément d'information, car le type de contenu du type est vide.
line 38: cvc-complex-type.2.1 : L'élément 'sld:Normalize' ne doit comporter aucun enfant ([children]) de type caractère ou élément d'information, car le type de contenu du type est vide.

This is the sld file :

<?xml version="1.0" ?>
<sld:StyledLayerDescriptor version="1.0.0" xmlns="http://www.opengis.net/sld" xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc" xmlns:sld="http://www.opengis.net/sld">
    <sld:UserLayer>
        <sld:LayerFeatureConstraints>
            <sld:FeatureTypeConstraint/>
        </sld:LayerFeatureConstraints>
        <sld:UserStyle>
            <sld:Name>ahfir</sld:Name>
            <sld:Title/>
            <sld:FeatureTypeStyle>
                <sld:Name/>
                <sld:Rule>
                    <sld:RasterSymbolizer>
                      <sld:ChannelSelection>
                        <sld:RedChannel>
                        <sld:SourceChannelName>1</sld:SourceChannelName>
                        <sld:ContrastEnhancement>
                          <sld:Normalize>
                           <sld:VendorOption name='algorithm'>StretchToMinimumMaximum</sld:VendorOption>
                           <sld:VendorOption name='minValue'>-55.2689</sld:VendorOption>
                           <sld:VendorOption name='maxValue'>214.7722</sld:VendorOption>
                          </sld:Normalize>
                        </sld:ContrastEnhancement>
                        </sld:RedChannel>
                        <sld:GreenChannel>
                        <sld:SourceChannelName>2</sld:SourceChannelName>
                        <sld:ContrastEnhancement>
                          <sld:Normalize>
                           <sld:VendorOption name="algorithm">StretchToMinimumMaximum</sld:VendorOption>
                           <sld:VendorOption name="minValue">-41.9121</sld:VendorOption>
                           <sld:VendorOption name="maxValue">163.9293</sld:VendorOption>
                          </sld:Normalize>
                        </sld:ContrastEnhancement>
                        </sld:GreenChannel>
                        <sld:BlueChannel>
                        <sld:SourceChannelName>3</sld:SourceChannelName>
                        <sld:ContrastEnhancement>
                          <sld:Normalize>
                           <sld:VendorOption name="algorithm">StretchToMinimumMaximum</sld:VendorOption>
                           <sld:VendorOption name="minValue">-22.1867</sld:VendorOption>
                           <sld:VendorOption name="maxValue">77.2479</sld:VendorOption>
                          </sld:Normalize>
                        </sld:ContrastEnhancement>
                        </sld:BlueChannel>
                      </sld:ChannelSelection>
                    </sld:RasterSymbolizer>
                </sld:Rule>
            </sld:FeatureTypeStyle>
        </sld:UserStyle>
    </sld:UserLayer>
</sld:StyledLayerDescriptor>

I followed exactly the Geoserver's documentation, here is the link

I'm using Geoserver 2.15.2

2

The sld schema that geoserver is using to verify the sld has not been updated to recognise the vendor options in side the normalise tag. The sld will work fine if you apply it.

1
  • Thank you it worked ! – Anass Ayar Sep 26 '19 at 16:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.