Unidata / thredds

THREDDS Data Server v4.6
https://www.unidata.ucar.edu/software/tds/v4.6/index.html
265 stars 179 forks source link

How to set default palette in TDS5/ncWMS2? #712

Open rsignell-usgs opened 7 years ago

rsignell-usgs commented 7 years ago

Thanks to https://github.com/Unidata/thredds/pull/699, I can now explore the behavior of ncWMS2 on TDS5.0 much more easily, since my now datasets work!

I'm trying now to figure out how to specify the default palette that ncWMS2 uses. Not on a per variable basis. I mean the default palette for everything. I know I'm supposed to like the new colormap, but my non-linear calibration has been honed for Rainbow over several decades. :stuck_out_tongue_closed_eyes:

I tried setting these ways in wmsConfig.xml (and restarting the TDS), but none had any effect:

<defaultPaletteName>rainbow</defaultPaletteName>
<defaultPaletteName>x-Rainbow</defaultPaletteName>
<defaultPaletteName>default-scalar%2Fx-Rainbow</defaultPaletteName>

I still get the same ncWMS2 default colormap: http://gamone.whoi.edu/thredds/Godiva.html?server=http://gamone.whoi.edu/thredds/wms/coawst_4/use/fmrc/coawst_4_use_best.ncd

2016-12-13_15-01-34

I did notice that in Godiva3, if I change the pallete, the requests look like this: http://gamone.whoi.edu/thredds/wms/coawst_4/use/fmrc/coawst_4_use_best.ncd?FORMAT=image%2Fpng&TRANSPARENT=TRUE&STYLES=default-scalar%2Fx-Rainbow&LAYERS=h&COLORSCALERANGE=5%2C5960&NUMCOLORBANDS=250&ABOVEMAXCOLOR=extend&BELOWMINCOLOR=extend&BGCOLOR=extend&LOGSCALE=false&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&SRS=EPSG%3A4326&BBOX=-80.678539062493,25.875037760425,-64.124962239575,42.428614583342&WIDTH=256&HEIGHT=256

where the style apparently is a combination of a "type" and a "palette" (e.g. STYLES=default-scalar%2Fx-Rainbow).

@lesserwhirls , do you know how to set the default in wmsConfig.xml?

I tried looking at the ncWMS2 gitbook for clues, but I did not find it there either: https://reading-escience-centre.gitbooks.io/ncwms-user-guide/content/03-config.html

lesserwhirls commented 7 years ago

I haven't taken a crack and hooking up wmsConfig.xml yet, so right now there isn't a way to set the default yet.