Hi Simone,
Thanks for your response,
but it works and is valid according to the validade button and it
rasterize, although there are two problems the legends are not correctly
generated and the map is colored twice.
Follow the complete valid sld example Using it with a map with
values between 8 and 56:
"
<?xml version="1.0" encoding="UTF-8"?><sld:StyledLayerDescriptor xmlns="
http://www.opengis.net/sld" xmlns:sld="http://www.opengis.net/sld"
xmlns:ogc="http://www.opengis.net/ogc" xmlns:gml="http://www.opengis.net/gml"
version="1.0.0">
<sld:NamedLayer>
<sld:Name>Default Styler</sld:Name>
<sld:UserStyle>
<sld:Name>Default Styler</sld:Name>
<sld:Title>salvarey</sld:Title>
<sld:FeatureTypeStyle>
<sld:Name>PseudoColor_8__0_56__0_salvarey_15__0</sld:Name>
<sld:Rule>
<sld:RasterSymbolizer>
<sld:ChannelSelection>
<sld:GrayChannel>
<sld:SourceChannelName>1</sld:SourceChannelName>
</sld:GrayChannel>
</sld:ChannelSelection>
<sld:ColorMap type="intervals">
<sld:ColorMapEntry color="#000000" opacity="1" quantity="8.0"
label=" x menor q 8"/>
<sld:ColorMapEntry color="#FF0100" opacity="1"
quantity="56.0" label=" 9 entre e n inclui 56"/>
</sld:ColorMap>
</sld:RasterSymbolizer>
</sld:Rule>
<sld:Rule>
<sld:RasterSymbolizer>
<sld:ChannelSelection>
<sld:GrayChannel>
<sld:SourceChannelName>1</sld:SourceChannelName>
</sld:GrayChannel>
</sld:ChannelSelection>
<sld:ColorMap type="values">
<sld:ColorMapEntry color="#FFFFFF" opacity="1" quantity="15"
label="Nulo: 15"/>
<sld:ColorMapEntry color="#FFFFFF" opacity="0" quantity="16"
label="Nulo: 16"/>
</sld:ColorMap>
</sld:RasterSymbolizer>
</sld:Rule>
</sld:FeatureTypeStyle>
</sld:UserStyle>
</sld:NamedLayer>
</sld:StyledLayerDescriptor>
"
att,
Danilo
2015-03-10 15:07 GMT-04:00 Simone Giannecchini <
simone.giannecch...@geo-solutions.it>:
> Ciao Danilo,
> such an SLD won't work in GeoServer. You can have only a single
> RasterSymbolizer.
> Regards,
> Simone Giannecchini
> ==
> GeoServer Professional Services from the experts! Visit
> http://goo.gl/NWWaa2 for more information.
> ==
> Ing. Simone Giannecchini
> @simogeo
> Founder/Director
>
> GeoSolutions S.A.S.
> Via Poggio alle Viti 1187
> 55054 Massarosa (LU)
> Italy
> phone: +39 0584 962313
> fax: +39 0584 1660272
> mob: +39 333 8128928
>
> http://www.geo-solutions.it
> http://twitter.com/geosolutions_it
>
> -------------------------------------------------------
> AVVERTENZE AI SENSI DEL D.Lgs. 196/2003
> Le informazioni contenute in questo messaggio di posta elettronica e/o
> nel/i file/s allegato/i sono da considerarsi strettamente riservate.
> Il loro utilizzo è consentito esclusivamente al destinatario del
> messaggio, per le finalità indicate nel messaggio stesso. Qualora
> riceviate questo messaggio senza esserne il destinatario, Vi preghiamo
> cortesemente di darcene notizia via e-mail e di procedere alla
> distruzione del messaggio stesso, cancellandolo dal Vostro sistema.
> Conservare il messaggio stesso, divulgarlo anche in parte,
> distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità
> diverse, costituisce comportamento contrario ai principi dettati dal
> D.Lgs. 196/2003.
>
> The information in this message and/or attachments, is intended solely
> for the attention and use of the named addressee(s) and may be
> confidential or proprietary in nature or covered by the provisions of
> privacy act (Legislative Decree June, 30 2003, no.196 - Italy's New
> Data Protection Code).Any use not in accord with its purpose, any
> disclosure, reproduction, copying, distribution, or either
> dissemination, either whole or partial, is strictly forbidden except
> previous formal approval of the named addressee(s). If you are not the
> intended recipient, please contact immediately the sender by
> telephone, fax or e-mail and delete the information in this message
> that has been received in error. The sender does not give any warranty
> or accept liability as the content, accuracy or completeness of sent
> messages and accepts no responsibility for changes made after they
> were sent or for other risks which arise as a result of e-mail
> transmission, viruses, etc.
>
>
> On Tue, Mar 10, 2015 at 7:57 PM, Danilo da Silveira Figueira
> <danilomal...@hotmail.com> wrote:
> > Hi all,
> >
> > When i am using two different rules to stylize a raster file the legend
> is
> > generated only for the first rule, how can i generate the legend for both
> > rules?
> >
> > Example: the below code, will generate a legend just with two rows the
> > "lower than 8" and "8 to 50". The row "Null Value: 15" is colored with
> the
> > specified color but the getlegendGraphic ignores it, how can i force the
> > legend to include this?
> >
> > "
> > <sld:Rule>
> > <sld:RasterSymbolizer>
> > <sld:ChannelSelection>
> > <sld:GrayChannel>
> > <sld:SourceChannelName>1</sld:SourceChannelName>
> > </sld:GrayChannel>
> > </sld:ChannelSelection>
> > <sld:ColorMap type="intervals">
> > <sld:ColorMapEntry color="#000000" opacity="1" quantity="8.0"
> label="lower
> > than 8"/>
> > <sld:ColorMapEntry color="#FF0100" opacity="1" quantity="50.0" label="8
> to
> > 50"/>
> > </sld:ColorMap>
> > </sld:RasterSymbolizer>
> > </sld:Rule>
> > <sld:Rule>
> > <sld:RasterSymbolizer>
> > <sld:ChannelSelection>
> > <sld:GrayChannel>
> > <sld:SourceChannelName>1</sld:SourceChannelName>
> > </sld:GrayChannel>
> > </sld:ChannelSelection>
> > <sld:ColorMap type="values">
> > <sld:ColorMapEntry color="#010203" opacity="1" quantity="15" label="Null
> > Value: 15"/>
> > </sld:ColorMap>
> > </sld:RasterSymbolizer>
> > </sld:Rule>
> > "
> >
> > Any help is appreciated, Thanks!
> >
> >
> ------------------------------------------------------------------------------
> > Dive into the World of Parallel Programming The Go Parallel Website,
> > sponsored
> > by Intel and developed in partnership with Slashdot Media, is your hub
> for
> > all
> > things parallel software development, from weekly thought leadership
> blogs
> > to
> > news, videos, case studies, tutorials and more. Take a look and join the
> > conversation now. http://goparallel.sourceforge.net/
> > _______________________________________________
> > Geoserver-users mailing list
> > Geoserver-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/geoserver-users
> >
>
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users