1

I have setup TomCat and THREDDS server (loaded war file) and attempted to serve up some *.nc files using via WMS protocol.

I can request the file but all I seem to get back is a black image.

enter image description here

I had something similar in geoserver but I was able to update the styles layer and setup ranges so that various colours were applied.

I have tried editing the 'wmsConfig.xml'and alter options such as the 'defaultColorScaleRange' but it doesn't seem to have the desired effect.

I have read the documentation a few times but I may be missing something , has anyone overcome this problem ? Any help would be great.

Cheers

Update 1

So as suggest below using the built in viewer I can see the image and this is what I would like to get by requesting via WMS.

Using built in viewer

address : http://10.19.38.63:8080/thredds/godiva2/godiva2.html?server=http://10.19.38.63:8080/thredds/wms/testAll/testData.nc#

enter image description here

Requesting initial attempt

http://10.19.38.63:8080/thredds/wms/testAll/testData.nc?service=WMS&version=1.3.0&request=GetMap&CRS=EPSG:4326&width=150&height=150&bbox=-10097025.688358642,-12875664.540581377,20037508.342789244,313086.06785608194&LAYERS=precipitation&format=image/png&STYLES=boxfill/red

Which returns just the black square :(

I will carry on and look at the WMS url used by th eopenlayers example, maybe thats the key... ill continue to update my questions as my journey begins :).

Update 2

Managed to work out that the SRS being passed in was incorrect and needed altering.

now next stage is to work out how to request a time series over a batch of NCDF files.....

Update 3

Managed to work out a way to automate requesting WMS services and with the aid of this great plugin for leaflet maps I have the desired output.

https://github.com/socib/Leaflet.TimeDimension

Basically call the WMS endpoint with getmap that I require building up the url relevant for the file I need to request.

The next step for me is looking at styled for the returned raster at this point seems like some Java code modification, but at least my initial problems have gone. phew!

Update 4

Gone away and tried to rebuild the Java on a project ncWMS which I found was standalone but now incorporated into THREDDS. Still having no joy with transparency raster created from NETCDF.

Looking at THREDDS code a bit more after I also tried changing palletes that didnt seem to work , issue raised

https://github.com/Unidata/thredds/issues/631

Madmartigan
  • 260
  • 3
  • 11

1 Answers1

1

You haven't shared the full url of your THREDDS request, but 10.19.38.63/thredds/wms/.... is the service url for the WMS GetCapabilities file. Which is an XML file describing the WMS service. That is not the THREDDS url for viewing the WMS via ncWMS. You need to scroll down the page to the Viewers: section and choose the Godiva2 (browser-based) link.

Eric Bridger
  • 3,751
  • 1
  • 19
  • 34
  • Thanks for reply , sorry yes I should elaborate on my question. using viewer it seems fine , I just cant seem to request it outside of the viewer. Ill update my question shortly , cheers for comment – Madmartigan Sep 09 '16 at 00:46
  • Looks like you figured out how to use WMS. If my answer helped you should accept it. – Eric Bridger Sep 09 '16 at 14:13