Re: [thredds] SLD for styling THREDDS Data Server WMS service

 tds-5.0.0-SNAPSHOT.war
<https://drive.google.com/a/ucar.edu/file/d/1vsaDxcwVl3u3-3u4t1z96dVBZSDdtfE5/view?usp=drive_web>

Hello Suman,

I have a fix for TDS 5.0 (PR #73 <https://github.com/Unidata/tds/pull/73>)
to allow the SLD parameter for WMS GetLegendGraphic requests. It should get
folded in soon and will then be in future releases and snapshots of TDS
5.0. In the meantime, if you want to test it out, I am including a .war
file you can try. For now you will need to strip the content of the SLD
parameter of all line feeds (‘\n’) before including it in the WMS request.
Otherwise, it will get rejected.

Support for SLD was not added to ncWMS (the WMS implementation used in TDS)
until version 2.x which we use in TDS 5.0. TDS 4.6 uses ncWMS 1.x which
does not support SLD styling.

Let me know how that works for you.

Cheers,

Ethan

PS Don’t forget to rename the .war file to `thredds.war` so a standard
install will be accessible at /thredds.


On Mon, Apr 6, 2020 at 11:03 PM Ethan Davis <edavis@xxxxxxxx> wrote:

> Hi Suman,
>
> It looks like a filter on request parameters is causing problems with the
> SLD parameter. I am digging into this and will get back to you in the next
> day or so.
>
> Cheers,
>
> Ethan
>
> On Wed, Apr 1, 2020 at 6:28 AM Suman Sanjel <Suman.Sanjel@xxxxxxxxxx>
> wrote:
>
>> Dear THREDDS Data Server Team,
>>
>>
>>
>>
>>
>>
>>
>> It's great to use THREDDS Data Server where we get lots of facilities.
>>
>>
>>
>>
>>
>>
>>
>> My query is that i like to style WMS of TDS using SLD. I have tried
>> different way but it did not work.
>>
>>
>>
>> The version which i am using is 4.6 and 5 beta version.
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> http://localhost:8080/thredds/wms/testAll/2004050300_eta_211.nc?REQUEST=GetLegendGraphic&LAYER=Z_sfc&SLD=%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22ISO-8859-1%22%3F%3E%0A%3CStyledLayerDescriptor%20version%3D%221.1.0%22%20xsi%3AschemaLocation%3D%22http%3A%2F%2Fwww.opengis.net%2Fsld%0AStyledLayerDescriptor.xsd%22%20xmlns%3D%22http%3A%2F%2Fwww.opengis.net%2Fsld%22%20xmlns%3Aogc%3D%22http%3A%2F%2Fwww.opengis.net%2Fogc%22%0Axmlns%3Ase%3D%22http%3A%2F%2Fwww.opengis.net%2Fse%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%0Axmlns%3Axsi%3D%22http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema-instance%22%3E%0A%20%20%3CNamedLayer%3E%0A%20%20%20%20%3Cse%3AName%3EZ_sfc%3C%2Fse%3AName%3E%0A%20%20%20%20%3CUserStyle%3E%0A%20%20%20%20%20%20%3Cse%3AName%3EThesholded%20colour%20scheme%3C%2Fse%3AName%3E%0A%20%20%20%20%20%20%3Cse%3ACoverageStyle%3E%0A%20%20%20%20%20%20%20%20%3Cse%3ARule%3E%0A%20%20%20%20%20%20%20%20%20%20%3Cse%3ARasterSymbolizer%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3Cse%3AOpacity%3E1.0%3C%2Fse%3AOpacity%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3Cse%3AColorMap%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cse%3ACategorize%20fallbackValue%3D%22%2300000000%22%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cse%3ALookupValue%3ERasterdata%3C%2Fse%3ALookupValue%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cse%3AValue%3E%23FF0000FF%3C%2Fse%3AValue%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cse%3AThreshold%3E275.0%3C%2Fse%3AThreshold%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cse%3AValue%3E%23FF00FFFF%3C%2Fse%3AValue%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cse%3AThreshold%3E280.0%3C%2Fse%3AThreshold%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cse%3AValue%3E%23FF00FF00%3C%2Fse%3AValue%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cse%3AThreshold%3E285.0%3C%2Fse%3AThreshold%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cse%3AValue%3E%23FFFFFF00%3C%2Fse%3AValue%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cse%3AThreshold%3E290.0%3C%2Fse%3AThreshold%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cse%3AValue%3E%23FFFFC800%3C%2Fse%3AValue%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cse%3AThreshold%3E295.0%3C%2Fse%3AThreshold%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cse%3AValue%3E%23FFFFAFAF%3C%2Fse%3AValue%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cse%3AThreshold%3E300.0%3C%2Fse%3AThreshold%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cse%3AValue%3E%23FFFF0000%3C%2Fse%3AValue%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fse%3ACategorize%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fse%3AColorMap%3E%0A%20%20%20%20%20%20%20%20%20%20%3C%2Fse%3ARasterSymbolizer%3E%0A%20%20%20%20%20%20%20%20%3C%2Fse%3ARule%3E%0A%20%20%20%20%20%20%3C%2Fse%3ACoverageStyle%3E%0A%20%20%20%20%3C%2FUserStyle%3E%0A%20%20%3C%2FNamedLayer%3E%0A%3C%2FStyledLayerDescriptor%3E
>>
>>
>>
>> when i pass this it response is
>>
>>
>>
>>
>>
>> <!doctype html>
>>
>> <html lang="en">
>>
>>
>>
>> <head>
>>
>>     <title>HTTP Status 400 – Bad Request</title>
>>
>>     <style type="text/css">
>>
>>         body {
>>
>>             font-family: Tahoma, Arial, sans-serif;
>>
>>         }
>>
>>
>>
>>         h1,
>>
>>         h2,
>>
>>         h3,
>>
>>         b {
>>
>>             color: white;
>>
>>             background-color: #525D76;
>>
>>         }
>>
>>
>>
>>         h1 {
>>
>>             font-size: 22px;
>>
>>         }
>>
>>
>>
>>         h2 {
>>
>>             font-size: 16px;
>>
>>         }
>>
>>
>>
>>         h3 {
>>
>>             font-size: 14px;
>>
>>         }
>>
>>
>>
>>         p {
>>
>>             font-size: 12px;
>>
>>         }
>>
>>
>>
>>         a {
>>
>>             color: black;
>>
>>         }
>>
>>
>>
>>         .line {
>>
>>             height: 1px;
>>
>>             background-color: #525D76;
>>
>>             border: none;
>>
>>         }
>>
>>     </style>
>>
>> </head>
>>
>>
>>
>> <body>
>>
>>     <h1>HTTP Status 400 – Bad Request</h1>
>>
>>     <hr class="line" />
>>
>>     <p><b>Type</b> Status Report</p>
>>
>>     <p><b>Message</b> Invalid query string </p>
>>
>>     <p><b>Description</b> The server cannot or will not process the
>> request due to something that is perceived to be a
>>
>>         client error (e.g., malformed request syntax, invalid request
>> message framing, or deceptive request routing).
>>
>>     </p>
>>
>>     <hr class="line" />
>>
>>     <h3>Apache Tomcat/9.0.30</h3>
>>
>> </body>
>>
>> </html>
>>
>>
>>
>>
>>
>> The version used in this is TDS 5 beta version
>>
>>
>>
>> The plain SLD used is
>>
>>
>>
>> <?xml version="1.0" encoding="ISO-8859-1"?> <StyledLayerDescriptor
>> version="1.1.0" xsi:schemaLocation="http://www.opengis.net/sld
>> StyledLayerDescriptor.xsd" xmlns="http://www.opengis.net/sld"; xmlns:ogc="
>> http://www.opengis.net/ogc"; xmlns:se="http://www.opengis.net/se";
>> xmlns:xlink="http://www.w3.org/1999/xlink"; xmlns:xsi="
>> http://www.w3.org/2001/XMLSchema-instance";> <NamedLayer> <se:Name>Z_sfc</
>> se:Name> <UserStyle> <se:Name>Thesholded colour scheme</se:Name> <
>> se:CoverageStyle> <se:Rule> <se:RasterSymbolizer> <se:Opacity>1.0</
>> se:Opacity> <se:ColorMap> <se:Categorize fallbackValue="#00000000"> <
>> se:LookupValue>Rasterdata</se:LookupValue> <se:Value>#FF0000FF</se:Value>
>> <se:Threshold>275.0</se:Threshold> <se:Value>#FF00FFFF</se:Value> <
>> se:Threshold>280.0</se:Threshold> <se:Value>#FF00FF00</se:Value> <
>> se:Threshold>285.0</se:Threshold> <se:Value>#FFFFFF00</se:Value> <
>> se:Threshold>290.0</se:Threshold> <se:Value>#FFFFC800</se:Value> <
>> se:Threshold>295.0</se:Threshold> <se:Value>#FFFFAFAF</se:Value> <
>> se:Threshold>300.0</se:Threshold> <se:Value>#FFFF0000</se:Value> </
>> se:Categorize> </se:ColorMap> </se:RasterSymbolizer> </se:Rule> </
>> se:CoverageStyle> </UserStyle> </NamedLayer> </StyledLayerDescriptor>
>>
>>
>>
>>
>>
>> I am getting this trouble from a long  time please help me how to use
>> SLD in TDS.
>>
>>
>>
>>
>>
>>
>>
>> Thank You.
>>
>> Suman Sanjel
>>
>>
>>
>>
>> ---------------------------------------------------------------------------
>>
>> *[image: icimod blue png logo]*
>>
>>
>>
>> *Suman Sanjel*
>>
>> GIS Application Developer
>>
>> Geospatial Solutions
>>
>>
>>
>> *International Centre for Integrated Mountain Development*
>>
>> GPO Box 3226, Kathmandu, Nepal.
>>
>> *T* +977-1-5275222  *ext* 531   |   *W* www.icimod.org
>>
>> Connect to ICIMOD:
>>
>> [image: facebook-logo-button] <http://www.facebook.com/icimod>   [image:
>> twitter-logo-button] <http://www.twitter.com/icimod>   [image: instagram]
>> <http://www.instagram.com/_icimod>   [image: youtube-logotype]
>> <http://www.youtube.com/icimod>   [image: linkedin]
>> <https://www.linkedin.com/company/icimod>
>>
>>
>> ---------------------------------------------------------------------------
>>
>> *Protect the pulse.*
>>
>>
>>
>>
>>
>> This email and any file(s) transmitted with it may be confidential and
>> intended solely for the use of the individual or entity to whom they are
>> addressed. If you have received this email in error please notify the
>> sender immediately or delete it from the system. Please note that any views
>> or opinions presented in this email are solely those of the author and do
>> not necessarily represent those of ICIMOD. ICIMOD has its own antivirus
>> program which scans all the outgoing emails. However, ICIMOD accepts no
>> liability and responsibility for any damage caused by this email.
>>
>> _______________________________________________
>> NOTE: All exchanges posted to Unidata maintained email lists are
>> recorded in the Unidata inquiry tracking system and made publicly
>> available through the web.  Users who post to any of the lists we
>> maintain are reminded to remove any personal information that they
>> do not want to be made public.
>>
>>
>> thredds mailing list
>> thredds@xxxxxxxxxxxxxxxx
>> For list information or to unsubscribe,  visit:
>> https://www.unidata.ucar.edu/mailing_lists/
>>
>

PNG image

PNG image

PNG image

PNG image

PNG image

PNG image

  • 2020 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the thredds archives: