THREDDS Server NetCDF file via WMS - geospatial

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.
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#
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

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.

Related

Linkedin - Preview image doesn't show

Been going round and round on this one. Not a new issue but struggling to identify exactly why LinkedIn doesn't like my images and everyone else does. Facebook and twitter show ok with it
At first thought might be meta issue or cache issue (am familiar with the clear method) or image requirements stated by LinkedIn but ruled all that out. The ssl is a free one but soon to be using a wildcard as facebook didn't like it to see if that has any effect.
The image server uses node js express to deliver static files.
If I just share the image, that shows an error of: "Cannot display preview. You can post as is, or try another link." which points to the server and image to me instead of the website.
The site and images are on different servers with different setups.
Main url is https://rocketthomerentals.com/property/5-bed-house-to-rent-in-newcastle-under-lyme/102750000371
with the image of
http://media.estateapps.co.uk/487/102750000371_IMG_371_1_large.jpg
Anything else I can try? Should be getting the new wildcard SSL sorted early next week but posting here to see if there is anything else I am missing I can try to see if that has any effect.
Thanks
For anyone who's gone around in circles about this issue, was resolved by defining the content type as image, it was missing from the server config.

Accessing BSP application through URL

I have created a bsp application. For accessing this application i am facing problems. And regarding URL i have some doubt.
Doubt 1:- http://xyz.abc.com:8000/sap(bD1lbiZjPTAwMQ==)/bc/bsp/ns/mt_mwm/issuesto.html
in this url what is (bD1lbiZjPTAwMQ==) this.
Problem: wnen i am maving TP development to quality this code ( (bD1lbiZjPTAwMQ==) ) got changed. and from quality to production again got changed.my queastion how to make it dynamic. from where i can get it.??
I am following this link https://help.sap.com/saphelp_nw70ehp1/helpdata/en/ca/f8b53a364e0e5fe10000000a11405a/content.htm
What you see is added by the SAP server for session handling! You don't have to worry about it, it will be added automatically. If you want to bookmark a link to your app then just remove this (bD1lbiZjPTAwMQ==). Also, never use this hard coded in your code! For more information see this.
If you want a static link, use this notation: http://xyz.abc.com:8000/sap(====)/bc/bsp/ns/mt_mwm/issuesto.html

Accept QueryString for Image delivered by Controller

I'm trying to make a controller that delivers a random background image. I have a MVC route from /random-background.jpg to /MyController/RandomBackground, and it's returns File(backgroundImage, "image/jpeg"). This is working fine.
I've disabled the 404 plugin for all QueryStrings that ends with random-image, so the image is showing up. However, it won't take any parameters, such as random-background.jpg?width=200. &format=jpg doesn't have any effect either.
How do I get ImageResizer to accept this for a "real image"? Do I have to use ImageResizer.ImageJob? If so, I would love an example I can understand :)
ImageResizer V3 and earlier cannot 'post-process' the result of an MVC action or third-party HTTPHandler.
You will need to use one of the virtual providers plugins, use URL rewriting, or implement your own IVirtualImageProvider.
See the best practices guide for an explanation of 'why'.

Amazon Mechanical Turk - ExternalHit Sample

I'm tyring to run the ExternalHit Sample that comes with the Command Line Tools installer. For the .question file I have the following ...
<?xml version="1.0"?>
<ExternalQuestionxmlns="http://mechanicalturk.amazonaws.com/AWSMechanicalTurkDataSchemas/2006-07-14/ExternalQuestion.xsd">
<ExternalURL>https://s3.amazonaws.com/MTurk_test/externalpage.htm?url=${helper.urlencode($urls)}</ExternalURL>
<FrameHeight>450</FrameHeight>
We kept the input file the same as in the sample. When we loadhits in either the sandbox or the standard mechanical turk interface the input variable (i.e. the web page) does not display in the frame. Additionally, you can select a radio button but you cannot submit your answer.
You're running into two problems here:
Due to same origin policy, the <iframe> in the resulting page is not going to display an arbitrary URL.
Even if it could display an arbitrary URL, that URL would have to be configured for SSL.
So, you'll be able to load this (another amazon URL using SSL):
https://s3.amazonaws.com/MTurk_test/externalpage.htm?url=https%3A%2F%2Fwww.mturk.com
But not this (amazon URL w/o SSL):
https://s3.amazonaws.com/MTurk_test/externalpage.htm?url=http%3A%2F%2Fwww.mturk.com
And not an arbitrary URL (even with SSL):
https://s3.amazonaws.com/MTurk_test/externalpage.htm?url=https%3A%2F%2Fwww.google.com
So, my guess is that this template is horribly outdated and used to work at some point in the past but is not compliant with modern web browser technology.
Best solution is just to provide a link for the worker to click to visit the URL.

Can I change the logo of an IBM community through the REST API

I found this piece of documentation that suggests that we should be able to PUT a new logo in a community.
But the documentation also states that it is ignored on input.
Before we start intensive troubleshooting, it would help if someone could confirm that we can indeed change the logo programmatically.
Use the web address in the href attribute to obtain an image that represents the community's logo. The following operations are supported:
GET
Use the web address in the href attribute to obtain the community logo image file. If a logo has not been set, a default image is returned.
PUT
Use the web address in the href attribute to upload a new community logo image and replace the current one.
Attention: Specify the content type of the image file being sent with the request. For example: "Content-Type: image/jpeg"
This is the source:
http://www-10.lotus.com/ldd/appdevwiki.nsf/xpDocViewer.xsp?lookupName=IBM+Connections+4.5+API+Documentation#action=openDocument&res_title=Community_entry_content_ic45&content=pdcontent
Using the IBM SBT SDK 1.0.1 I was able to call CommunityService.updateCommunityLogo(new File("/path/to/my.jpeg"), communityUuid) without any error, but the JPEG I referred to was not set as the community logo however.
Maybe the size was not correct?
Sorry for this "non-answer", but it may help other people anyway: To fix the SBT SDK code at least :-/
UPDATE 2014-JUN-25:
I took a deeper dive into the http.wire logs, and surprisingly the call seems to trigger a logout (or session invalidation) without further notice. The REST request receives 200 OK but also some JavaScript looking like "hey guy, confirm who you are", and the browser prompts with a full-window Connections login prompt, although the LTPA token should not have timed out yet.
This is annoying, too, for another reason: If Connections is used inside a framed UI, the "main" application is wiped away after that, forcing Connections to full-window mode.
With IBM SBT SDK 1.0.3 (as of July 17, 2014) and IC5 it is working now. I had no opportunity to test this feature with 1.0.3 and IC45 however, but with 1.0.2 and IC5 it did NOT work; so it seems that something in 1.0.3 has been fixed here.
#mpjjonker you can look at CommunityService.java
the method updateCommunityLogo talks about using /communities/service/html/image URL to put the image.
String url = "/communities/service/html/image";
getClientService().put(url, parameters, headers, file, ClientService.FORMAT_NULL);

Resources