[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [thredds] SLD for styling THREDDS Data Server WMS service [Ticket ID: WFQ-576355]



Hi Suman,

Glad that worked for you.

Cheers,

Ethan

On Fri, Apr 17, 2020 at 12:05 AM Suman Sanjel <address@hidden> wrote:

Hello Ethan,

Â

I would like to thank you so much for this kind support. Yes, It works when I used that .war file Âand Âstrip â\nâ from SLD Âbefore including it in WMS request.

Â

Cheers,

Â

Suman Sanjel

Â

From: Ethan Davis [mailto:address@hidden]
Sent: Tuesday, April 14, 2020 11:07 PM
To: Suman Sanjel
Cc: address@hidden
Subject: Re: [thredds] SLD for styling THREDDS Data Server WMS service

Â

Hello Suman,

Â

I have a fix for TDS 5.0 (PR #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 <address@hidden> 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 <address@hidden> 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

Â

---------------------------------------------------------------------------

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:

facebook-logo-buttonÂÂÂtwitter-logo-buttonÂÂÂinstagramÂÂÂyoutube-logotypeÂÂÂlinkedin

---------------------------------------------------------------------------

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
address@hidden
For list information or to unsubscribe, visit: https://www.unidata.ucar.edu/mailing_lists/

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
address@hidden
For list information or to unsubscribe,  visit: 
https://www.unidata.ucar.edu/mailing_lists/ 

NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.