TDS Tutorial: Serving Data with OGC Services (WCS and WMS)

Setting up WCS and WMS

Allowing WCS and WMS

Both WCS and WMS must be explicitly allowed in the threddsConfig.xml file.

WCS Configuration

The threddsConfig.xml file that is distributed with the TDS (and you should be using now) has the WCS section commented out. [More details on WCS configuration are available in the WCS section of the threddsConfig.xml file documentation.]

To enable WCS, the WCS section must be uncommented and the content of the allow element changed to "true". Default values will be used if the dir element is commented out.

WMS Configuration

The WMS section should look something like:

<WMS>
    <allow>false</allow>
    <paletteLocationDir>/data/my/pallettes/</paletteLocationDir>
    <ogcMetaXML>OGCMeta.xml</ogcMetaXML>
    <dir>/temp/ncache/</dir>
    <scour>15 min</scour>
    <maxAge>30 min</maxAge>
</WMS>

[More details on WMS configuration are available in the WMS section of the threddsConfig.xml file documentation.

To enable WMS, add a WMS section similar to the above and change the content of the allow element to "true". Default values will be used if the paletteLocationDir and dir elements are commented out.

Exercise: Allow WCS and WMS Services

  1. Edit the threddsConfig.xml file and allow WCS and WMS services as discussed above.

Adding WCS and WMS Services

Once the WCS and WMS services are enabled, all that is required for the TDS to provide WCS and WMS access to datasets is for those datasets to reference WCS and WMS service elements. The simplest way to add WCS and WMS services is to add WCS and WMS service elements to an existing compound service. For instance:

<service name="grid" serviceType="Compound" base="" >
    <service name="odap" serviceType="OpenDAP" base="/thredds/dodsC/" />
    <service name="wcs" serviceType="WCS" base="/thredds/wcs/" />
    <service name="wms" serviceType="WMS" base="/thredds/wms/" />
    <service name="http" serviceType="HTTPServer" base="/thredds/fileServer/" />
</service>

Exercise: Add WCS and WMS Services to NAM data

  1. Open a NAM dataset in ToolsUI [webstart] and make sure it is recognized as gridded data.
  2. Edit the catalog.xml file and add WCS and WMS services to the NAM dataset.

Using WCS and WMS

WMS Clients

WCS Clients

Exercise: Look at WMS and WCS

  1. Browse to a NAM dataset
  2. Click on the WMS access URL.
  3. Click on the WCS access URL.
  4. Try WMS access in the IDV:
    1. Open IDV [webstart]
    2. In the Dashboard "Data Chooser" tab, select "Catalogs"
    3. Cut and Paste the GetCapabilities URL into the selector
    4. Browse to the layers, select, and "Add Source"

THREDDS This document is maintained by Unidata and was last updated Send comments to THREDDS support.