Unidata / tds

THREDDS Data Server
https://docs.unidata.ucar.edu/tds/5.0/userguide/index.html
BSD 3-Clause "New" or "Revised" License
65 stars 27 forks source link

How to define new styles in TDS5/ncWMS2? #65

Closed David-Gil closed 8 months ago

David-Gil commented 6 years ago

I'm using v5.0.0-alpha3.

I'm trying to add new styles to TDS5, but I haven't been able to do so.

The styles and the palettes used in TDS5 are contained in edal-graphics-1.2.7.jar. How can new styles be added without touching that jar file?

Thank you!!

David-Gil commented 6 years ago

Related to Unidata/thredds#967

David-Gil commented 6 years ago

I've tried to configure ncWMS2 to add new styles in TDS as per https://reading-escience-centre.gitbooks.io/ncwms-user-guide/content/02-installation.html#servlet with no success.

What I have done:

The new style doesn't appear in the request=GetMetadata&item=layerDetails URL nor in the GetCapabilities URL.

cofinoa commented 6 years ago

@David-Gil,

I don't have experience with the ncWMS2, but I think it should add the parameters to $CATALINA_BASE/conf/Catalina/localhost/thredds.xml which is the actual webapp where the ncwms servlet is contained.

But it could be better if instead of adding the parameters to the above context description, try to add it directly into the webapp deployment config into the $CATALINA_BASE/webapps/thredds/WEB-INF/web.xml once the TDS is been deployed.

<!-- edal-wms servlet -->
<context-param>
    <param-name>configDir</param-name>
    <param-value>/opt/tomcat/ncWMS2</param-value>
</context-param>
<context-param>
    <param-name>paletteDirs</param-name>
    <param-value>/opt/tomcat/ncWMS2/palettes</param-value>
</context-param>
<context-param>
    <param-name>styleDirs</param-name>
    <param-value>/opt/tomcat/ncWMS2/styles</param-value>
</context-param>
.......
<!-- end edal-wms servlet -->

More details at: https://tomcat.apache.org/tomcat-8.0-doc/config/context.html#Context_Parameters

David-Gil commented 6 years ago

@cofinoa

I tried both $CATALINA_BASE/conf/Catalina/localhost/thredds.xml and $CATALINA_BASE/webapps/thredds/WEB-INF/web.xml and none of them got the style added...

cofinoa commented 6 years ago

@David-Gil

Sorry to hear that. As I have mentioned I'm not experienced on the ncWMS2 service in the TDS.

BTW, there is any relevant info on the Tomcat or TDS logs that could be related to that issue?

lesserwhirls commented 6 years ago

Greetings @David-Gil - the TDS does not use ncWMS2 exactly, rather we use the edal-wms artifact (ncWMS2 is built on top of edal-wms as well). We still need to hook up the config options to be exposed through the TDS.

David-Gil commented 6 years ago

Thank you, @lesserwhirls

gajowi commented 4 years ago

I'm also seeking this functionality.

gajowi commented 4 years ago

I see info here: https://docs.unidata.ucar.edu/tds/5.0/userguide/adding_ogc_iso_services.html but I think it only applies to the old setup (not 5.0) at least for ncWMS

tdrwenski commented 8 months ago

I just came across this old issue. We do have a way to configure custom palettes and styles in the latest TDS 5.5-SNAPSHOT, see documentation here for more information. We have an open issue for configuring other options such as Godiva basemaps here: https://github.com/Unidata/tds/issues/469.