Hello users,

In reference this question, I could create a sld with colormap applying a
contrast enhancement at the same time.  I got a warning error
vc-complex-type.2.1:t
he element ‘normalize' must not have any characters or any [child] element
information elements, because the type content type is empty.but it works
when I compare with other programs.

A snippet of sld :

<?xml version="1.0" encoding="UTF-8"?>

<StyledLayerDescriptor xmlns="http://www.opengis.net/sld"; version="1.0.0"
xmlns:sld="http://www.opengis.net/sld"; xmlns:gml="http://www.opengis.net/gml";
xmlns:ogc="http://www.opengis.net/ogc";>
  <UserLayer>
    <LayerFeatureConstraints>
      <FeatureTypeConstraint/>
    </LayerFeatureConstraints>
    <UserStyle>
      <Name>DOY</Name>
      <FeatureTypeStyle>
        <Rule>
          <RasterSymbolizer>
            <Opacity>1</Opacity>
            <ChannelSelection>
              <GrayChannel>
                <SourceChannelName>1</SourceChannelName>
                <ContrastEnhancement>
                  <Normalize>
                    <VendorOption
name="algorithm">StretchToMinimumMaximum</VendorOption>
                    <VendorOption name="minValue">1</VendorOption>
                    <VendorOption name="maxValue">365</VendorOption>
                  </Normalize>
                </ContrastEnhancement>
              </GrayChannel>
            </ChannelSelection>
            <ColorMap type='intervals' extended='true'>
              <ColorMapEntry quantity="1" color="#000158" label="19001"/>
              <ColorMapEntry quantity="2" color="#00035C" label="19002"/>
              <ColorMapEntry quantity="3" color="#000560" label="19003"/>
              <ColorMapEntry quantity="4" color="#000764" label="19004"/>
              <ColorMapEntry quantity="5" color="#000967" label="19005"/>


Is it possible to get min and max automatically from the layer?  Or using
the other formats CSS, YSLD is possible to do?



Thank you

Imma

Missatge de Andrea Aime <andrea.a...@geosolutionsgroup.com> del dia dt., 14
de febr. 2023 a les 16:22:

> As far as I remember, one cannot apply contrast stretch and colormap at
> the same time, try using one or the other, but not both at the same time
>
> Cheers
> Andrea
>
> On Tue, Feb 14, 2023 at 12:53 PM geosim - <geoi...@gmail.com> wrote:
>
>>
>>
>>
>> Dear Andrea,
>>
>> I attach you.
>> Also I wanted to apply StretchToMinimumMaximum according to Mininum and
>> Maximum values, but I don't know how
>>
>> Thank you
>>
>> Missatge de Andrea Aime <andrea.a...@geosolutionsgroup.com> del dia dt.,
>> 14 de febr. 2023 a les 11:45:
>>
>>> Can you please share the SLD style you are referring to?
>>>
>>> Best regards
>>> Andrea
>>>
>>> On Tue, Feb 14, 2023 at 11:29 AM geosim - <geoi...@gmail.com> wrote:
>>>
>>>> Dear,
>>>>
>>>> I have an image tiff, I created a raster style that contains a
>>>> ColorMaps, but in the previsualization I got the following error:
>>>>
>>>> I use Geoserver 2.20.1
>>>> [image: image.png]
>>>>
>>>>
>>>> [image: image.png]
>>>>
>>>> How can I solve?
>>>>
>>>> Thank you
>>>>
>>>> Imma
>>>> _______________________________________________
>>>> 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
>>>>
>>>
>>>
>>> --
>>>
>>> Regards,
>>>
>>> Andrea Aime
>>>
>>> ==
>>> GeoServer Professional Services from the experts!
>>>
>>> Visit http://bit.ly/gs-services-us for more information.
>>> ==
>>>
>>> Ing. Andrea Aime
>>> @geowolf
>>> Technical Lead
>>>
>>> GeoSolutions Group
>>> phone: +39 0584 962313
>>>
>>> fax:     +39 0584 1660272
>>>
>>> mob:   +39  339 8844549
>>>
>>> https://www.geosolutionsgroup.com/
>>>
>>> http://twitter.com/geosolutions_it
>>>
>>> -------------------------------------------------------
>>>
>>> Con riferimento alla normativa sul trattamento dei dati personali (Reg.
>>> UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si
>>> precisa che ogni circostanza inerente alla presente email (il suo
>>> contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è
>>> riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il
>>> messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra
>>> operazione è illecita. Le sarei comunque grato se potesse darmene notizia.
>>>
>>> This email is intended only for the person or entity to which it is
>>> addressed and may contain information that is privileged, confidential or
>>> otherwise protected from disclosure. We remind that - as provided by
>>> European Regulation 2016/679 “GDPR” - copying, dissemination or use of this
>>> e-mail or the information herein by anyone other than the intended
>>> recipient is prohibited. If you have received this email by mistake, please
>>> notify us immediately by telephone or e-mail
>>>
>> _______________________________________________
>> 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
>>
>
>
> --
>
> Regards,
>
> Andrea Aime
>
> ==
> GeoServer Professional Services from the experts!
>
> Visit http://bit.ly/gs-services-us for more information.
> ==
>
> Ing. Andrea Aime
> @geowolf
> Technical Lead
>
> GeoSolutions Group
> phone: +39 0584 962313
>
> fax:     +39 0584 1660272
>
> mob:   +39  339 8844549
>
> https://www.geosolutionsgroup.com/
>
> http://twitter.com/geosolutions_it
>
> -------------------------------------------------------
>
> Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE
> 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si
> precisa che ogni circostanza inerente alla presente email (il suo
> contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è
> riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il
> messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra
> operazione è illecita. Le sarei comunque grato se potesse darmene notizia.
>
> This email is intended only for the person or entity to which it is
> addressed and may contain information that is privileged, confidential or
> otherwise protected from disclosure. We remind that - as provided by
> European Regulation 2016/679 “GDPR” - copying, dissemination or use of this
> e-mail or the information herein by anyone other than the intended
> recipient is prohibited. If you have received this email by mistake, please
> notify us immediately by telephone or e-mail
>
_______________________________________________
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