Hi, 
in coverage view, different wieghts to bands could be achieved by utilizing
a raster algebra through Ras:Jiffle added in GeoServer version 2.14. 
https://docs.geoserver.org/stable/en/user/styling/sld/extensions/rendering-
transform.html#running-map-algebra-on-the-fly-using-jiffle
(https://docs.geoserver.org/stable/en/user/styling/sld/extensions/rendering-transform.html#running-map-algebra-on-the-fly-using-jiffle)
 
The script itself would look something like: 

<span 
style='margin:0px;padding:0px;border:0px;font-weight:bold;font-style:inherit;font-family:inherit;vertical-align:baseline;color:rgb(6,40,115)'><ogc:Literal></span>
    first = src[0];
    second = src[1];
    third = src[2];
    dest = (3*first + 4*second + 5*third) / 12;
<span 
style='margin:0px;padding:0px;border:0px;font-weight:bold;font-style:inherit;font-family:inherit;vertical-align:baseline;color:rgb(6,40,115)'></ogc:Literal></span>
Lubomir Bucek
---------- Původní e-mail ----------
Od: Rahkonen Jukka (MML) <[email protected]>
Komu: Jon Britton <[email protected]>, geoserver-users@lists.
sourceforge.net <[email protected]>
Datum: 8. 1. 2019 10:47:27
Předmět: Re: [Geoserver-users] SLD for styling RGB raster as grayscale
"


Hi,

 

How about making a new layer through coverage view https://docs.geoserver.
org/latest/en/user/data/raster/coverageview.html
(https://docs.geoserver.org/latest/en/user/data/raster/coverageview.html)?

A grayscale image from RGB might get better if different weights are applied
to input bands but I do not know if it is possible with coverage views.

 

-Jukka Rahkonen-

 



 Lähettäjä: Jon Britton [mailto:[email protected]]
 Lähetetty: 8. tammikuuta 2019 10:59
 Vastaanottaja: [email protected]
 Aihe: [Geoserver-users] SLD for styling RGB raster as grayscale



 

Hi,

 

We need to be able to provide a grayscale version of one of our map layers,
however there isn’t an obvious way to do this. It easy to produce a single-
band grayscale image, e.g.:

 

<RasterSymbolizer>

    <Opacity>0.6</Opacity>

    <ChannelSelection>

        <GrayChannel>

            <SourceChannelName>1</SourceChannelName>

        </GrayChannel>

    </ChannelSelection>

</RasterSymbolizer>

 

However I need to include all bands. Is there a way to do this using an SLD
without pre-processing the data? The image is RGB.

 

Thanks,

 

Jon

 



Jon Britton 
 Software Engineer, Delivery Team

0121 232 8007
07920101956

[email protected](mailto:[email protected]) 



 



Dotted Eyes Logo (http://www.field-dynamics.co.uk)      



                                Twitter (https://twitter.com/field_dynamics)

      LinkedIn (https://www.linkedin.com/company/field-dynamics-consultancy)





 



 T: +44 (0) 121 232 8050 |  E: [email protected]
(mailto:[email protected]) |  W: www.field-dynamics.co.uk
(http://field-dynamics.co.uk)




Field Dynamics is a trading name of Dotted Eyes Solutions Ltd. Registered 
office: 67-71 Northwood Street, Birmingham, B3 1TX. Company registration 
number: 9506624.


This message may contain confidential and privileged information. If you are
not the intended recipient, please accept our apologies. Please do not
disclose, copy or distribute information in this email or take any action in
reliance on its contents: to do so is strictly prohibited and may be
unlawful. Please inform us that this message has gone astray before deleting
it. Dotted Eyes Solutions Limited have taken precautions to minimize the 
risk of transmitting software viruses, however we advise you to carry out 
your own virus checks on any attachment to this message.




 


_______________________________________________
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


[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users
"
_______________________________________________
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


[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to