Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

WMS requests in Metview can be defined and executed by the WMS Client  icon. You can find this icon in the Data Access icon drawer.

 

Create a new WMS Client  icon in your ‘wms_tutorial’ folder (by dragging it into the folder). Rename it ‘NASA’ and open its editor (double-click or right-click, edit). You should see the interface below:  

Loading GetCapabilities

Type in the following web address into the URL bar at the top of the interface:

http://neowms.sci.gsfc.nasa.gov/wms/wms

Now we will send the GetCapabilities request to this server by clicking on the Load GetCapabilities button in the toolbar (hitting enter in the URL bar results in the same action).

 

This operation can take a while depending on the network traffic and the server load. If the server does not seem to reply the request can be interrupted any time by clicking on the Stop Load Process button in the toolbar.

 

Please note that there is a log panel at the bottom of the editor displaying detailed information about the request sent to the server and indicates its status, as well. This panel can be hidden or shown by the View Log toggle button in the toolbar. The statusbar, at the bottom of the interface, briefly indicates the status of the current operation.

...

If the GetCapabilities request was successful the editor is populated with the replied data.

...

The WMS client analyses the returned GetCapabilities document and displays the layers (Layer tree tab) and supported file formats (Format combo box in the toolbar) on the left hand side. Formats that cannot be visualised in Metview are greyed out in the list.

...

Now browse the layer tree on the left hand side and select the sub-layer called

Code Block
Sea Surface Temperature 1981-2006 (1 month - AVHRR)

Then switch to the Layer information tab on the right hand side of the editor. This tab shows the properties of the selected layer. At first what you can see here is the meta-data:

...

  • CRS/SRS: It stands for Coordinate Reference System (for WMS version 1.3.0 or later) or Spatial Reference System (older WMS versions). Each layer can offer an arbitrary number of reference systems. Metview currently supports the CRS:84 and EPSG:4326 reference systems. Both stand for the lat-lon or plate-carrée projection. Please note that a bounding box is associated for each CRS/SRS in a given layer. However, this bounding box is not editable in the WMS Client editor, instead Metview will adjust it automatically for the needs of visualisation.
  • Style: It specifies the visual style for the map image generation. Each layer can contain an arbitrary number of styles (even none).

...

Setting the Layer Properties

Now we will specify the date and time for our Sea Surface Temperature layer. Click on the Layer settings tab on left hand side of the editor. This shows the user-settable layer properties. We already know CRS and Style from the previous step. On top of these we can see Time here. If we click on the extension button next to the label the available values will be listed.

 

Time is a predefined dimension in the WMS standards. Dimensions are optional layer properties and we will see how to work with them in Part 3 of this tutorial. At present it is enough to select the default value by clicking on item Default in the list.

...

Having specified the time we can generate a preview for the selected layer. Click on the Generate preview button in the layer tab. Now Metview builds and sends a GetMap request to the server to acquire a map image for the layer using the specified CRS, style and time.

 

At the same time another request is sent to the server to generate a legend image for the given style (if it is available). Just like in the case of the GetCapabilities request, the requests sent to the server can be seen in the log panel area. When the server replies for these requests the resulting images are displayed in the Layer information tab.

...

One of the main purposes of the WMS client editor is to automatically generate a GetMap request that, in the end, can be visualised in Metview. This GetMap request is kept continuously updated as we change our layer settings in the interface. To see this request just click on the GetMap request tab in the right hand side of the editor.

...

Saving the GetMap Request

...

You can see here a similar image to the preview but this time it is overlaid with the Metview coastlines. By clicking on the ‘NASA’ layer in the Layers tab (on the right hand side of the plot window) you will see the meta-data associated with the visualised WMS layer and the legend, as well.

...

Remarks:

  • When a WMS client icon is visualised the GetCapabilities request is not executed but the meta-data (including the legend URL) stored in the icon is used to populate the Layers tab in the Display Window. As mentioned above, the meta-data is written into the icon when we save the settings in the WMS client editor. This means you need to re-edit your icon to update the meta-data if it has been changed on the server in the meantime.
  • Please be aware that WMS services are subject to change and a request that works today might be invalid tomorrow. In this case the WMS client icon should be re-edited to pick up the latest changes. The most typical example is a WMS service providing observations with the Time dimension containing only the most recent dates.
  • Please note that the WMS images generated by the WMS client icon are not cached in Metview. This means that whenever you visualise a WMS client icon its GetMap request is always executed. However, there is an ongoing work to implement WMS image caching and it will be available in future Metview releases.

...

Duplicate your ‘NASA’ WMS Client icon and rename the duplicate ‘NASA loop’. Edit it and select the Layer settings tab on the left hand side. This panel lists all the dimensions of the selected layer. Here we can only see dimension Time because only this dimension is defined for the layer. Now click on the extension button next to the Time label to see all the possible values. What you can see here is as follows (apart from the default value):

Code Block
1981-09-01/2006-12-01/P1M

This expression defines a range of time values based on a special encoding (this is the extension of the ISO8601 standard). This expression reads as: dates from 1981-09-01 to 2006-12-01 by a one month step.

Now we will specify every month in 2006 to generate twelve map images for our animation. First we need to clear the current selection (by clicking on the clear button to the right of the text input area) and then type in the following text:

Code Block
2006-01-01/2006-01-12/P1M

Having done this the interface should look like as follows:

...

As mentioned above, by specifying twelve dates we generated twelve individual GetMap requests. To inspect these requests click on the GetMap request tab in the right hand side of the editor.

...

We can see here that the requests are almost identical and the only difference is that Time is varying from one request to the other. Please note that for the sake of better readability the dimensions (in our case it is only Time) are always highlighted in a different colour (orange) to the other parameters in this list.

...

In folder ‘wms_tutorial’ duplicate your ‘NASA’ WMS Client icon and rename the duplicate ‘NASA plain’. Edit it and find the Mode combo box in the bottom left corner of the user interface.

...

Now select option “Plain” from the combo box to enter the plain editing mode. You should see the following user interface:

...

The editable WMS request parameters are listed on the left hand side of the interface. Whenever you edit a parameter the WMS request displayed on the right hand side of the interface is immediately updated.

To demonstrate the editor’s capabilities we will change parameter Time by adding an another date to it. Now change parameter Time and type in the following text into its editor:

Code Block
2006-11-01,2006-12-01

From Part 3 we know that the date we added (November 2006) is a valid date. We also know that Time is a WMS dimension so the specification of multiple values results in multiple  map images. Thus you have just defined two WMS requests (i.e. two animation frames for Metview) as shown below:

...

Create a new WMS Client icon. Rename it ‘NASA topography’ and open its editor. Select ‘Import’ from the File menu in the menu bar to start up the Import dialog. Now open your ‘NASA topography request’ icon’s editor (if you have not done so) then copy and paste the request into the Import dialog.

...

Having finished it just press the Import button to populate the WMS client user interface with the request parameters. Now preview the selected layer and visualise it (after saving the settings) then close the editor.

...

The quickest way to generate a macro is to simply save a visualisation on screen as a Macro icon. Visualise your ‘NASA’ WMS Client icon, drop the ‘coaslines_grey’ and ‘mslp’ icons into the plot and click on the macro icon in the tool bar of the Display Window.

...

Now a new Macro icon called 'MacroFrameworkN' is generated in your folder. Right-click visualise this icon. Now you should see your original plot reproduced.

...