[thredds] SLD for styling THREDDS Data Server WMS service

  • To: "thredds@xxxxxxxxxxxxxxxx" <thredds@xxxxxxxxxxxxxxxx>, "support-thredds@xxxxxxxxxxxxxxxx" <support-thredds@xxxxxxxxxxxxxxxx>
  • Subject: [thredds] SLD for styling THREDDS Data Server WMS service
  • From: Suman Sanjel <Suman.Sanjel@xxxxxxxxxx>
  • Date: Sat, 28 Mar 2020 05:53:35 +0000
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=icimod.org; dmarc=pass action=none header.from=icimod.org; dkim=pass header.d=icimod.org; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jlLNI//kZOFCvVb8BYn/6f7ADoEEybJglJF/OSSdjvU=; b=X5m3ClrlC2AlBHrgkxdc/iQgEf4oChrWg6XsXfauK1NlR2y7xHOZCO98AW6mYzuQUH61PN9t0ONu9oww9CjzIQBwFCXZTHcRSirTo87Ul2QiAe6iOyvU7l29/k1Ohsg4Bv4YW7nSts3BLYyBZ3ZybBuGIz5/GsSSh9bimUf7mMgwiEcqp7DR/2ygmYKzHXELasspDac/peRtdIBJXsMGD/Pz3pGx45Ct6b7BIlv7/MjLiY7d3dnIIi4cA3PgPHHTIpD0U/5xyWYT+eHeLxRidLBsctl4s+yOU/8yj7+7f/m221zHR0yAGBQk5FSGql3PC5A2VxJqkWPP9uKcKFxnKA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Qwl3YumefpogDqNs/0BkC79mi+htM+Rx6EgcpHLO3Dqze0rB1CpqTrDVM4i8wkxxSJeNdFE2OU7eSoV3e0o/GupKZCmKt4T1eRIgUUpUTJzTbF9x3z8CS9pkaPsZloZJeStJk7VIWtRevFj/cRW1uQV5gbrTx2SYuQS7IdgMsKkliwvdiB7GnmLm/bCGJ+Hgl6SUL2ZZg3MMJ0aUCZp1nTcFq/w04qvTWn0+jfSxqjaBlHMYzxyJfNgaAOWbHRGJ4+yD+R5nBShR8TwlwdC8fBOprHtKxwrt1/0vHLLdfuBn2yt7w8+pp6pfBD2ZWu5MBvyduptT7aIpv3mLgYoluw==
  • Authentication-results: spf=none (sender IP is ) smtp.mailfrom=Suman.Sanjel@xxxxxxxxxx;
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<http://www.icimod.org/>
Connect to ICIMOD:
[facebook-logo-button]<http://www.facebook.com/icimod>   [twitter-logo-button] 
<http://www.twitter.com/icimod>    [instagram] 
<http://www.instagram.com/_icimod>    [youtube-logotype] 
<http://www.youtube.com/icimod>    [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.

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: