Making OGC WCS Server Requests

This section outlines the steps required to query and return information from an OGC server. The goal is to return a data file containing a specific geospatial coverage as unrendered data. A coverage is gridded data that typically has a 1-, 2-, or 3-axis spatial coordinate reference system. Broadly, an information request from a WCS sever requires determining what data is available from a server (coverage offering briefs), determining what data collection (coverage offerings) from which you want to request data (a coverage), making the requests, and returning unrendered data.

Note
You can implement a callback to return information about the status of requests. See Using Callbacks with the IDLnetOGCWCS Object for details.

After you create an IDLnetOGCWCS object, you will need to complete the following steps:

  1. Identify the WCS server. The easiest way to do this is to pass a working URL to the IDLnetOGCWCS::ParseUrl method, which sets the required URL_HOSTNAME and URL_PATH properties. Alternately, you can manually set properties related to the URL. See Translating a URL into Property Values for information on which URL components belong to which IDLnetOGCWCS properties.
  2. Note
    If dealing with secure WCS servers, see HTTP Authentication, Security and Encoding for additional information.

  3. Determine what information is available on the WCS server by making a GetCapabilities request. This typically returns and parses an XML file that contains brief information about the available coverages. See IDLnetOGCWCS::GetCapabilities for details. You can modify the CAPABILITIES_FILENAME property to define the location this file is stored.
  4. Return the information contained in the coverage offering briefs by calling IDLnetOGCWCS::GetCoverageOfferingBriefs. You must call this method to return information for the specified coverage offering brief(s) in an IDL structure. The NAME field value of this structure is required to request additional information from an OGC server using the DescribeCoverage method, described next. If you wish, you can also call IDLnetOGCWCS::GetServiceSection to return service information from the XML file, but this is not necessary.
  5. Request detailed information about one or more coverage offerings by specifying a value for the NAME keyword in the IDLnetOGCWCS::DescribeCoverage call. The server will typically return an XML file containing detailed information about the coverage(s). You can modify the DESCRIBE_COVERAGE_FILENAME property to define the location this file is stored.
  6. Access the information in the XML file returned by DescribeCoverage by calling IDLnetOGCWCS::GetCoverageOffering. This returns a complex structure describing the offering details.
  7. Return data from the server by calling IDLnetOGCWCS::GetCoverage with a number of parameters describing the exact data to be returned. You can modify the COVERAGE_FILENAME property to define the location this file is stored.
  8. Model and render the data as defined by your application.

Translating a URL into Property Values

A valid WCS server URL is required to establish communication with an OGC WCS server. Additionally, IDLnetOGCWCS URL-related property values must be set before data can be successfully requested from a OGC WCS server. Either set the required properties manually (using SetProperty) or pass a URL to ParseURL. The IDLnetOGCWCS::ParseUrl method automatically parses a given URL and sets related property values.

Note
Regardless of how properties are set, the URL_HOSTNAME and URL_PATH properties must be set before calling the GetCapabilities, DescribeCoverage or GetCoverage methods.

The following table describes how the components of a given URL should be assigned to property values. Consider the following URL (which would typically exist on a single line):

http://my.hostname.com:8080/demo/cgi_path?customprefix& 
Version=1.0.0&SERVICE=WCS&CustomMiddle&Request=GetCapabilities& 
CustomSuffix 

Components of this URL map to properties as follows.

Table 33-2: Mapping URL Components to Properties 

Property
Value

URL_SCHEME

http 

URL_HOSTNAME

my.hostname.com 

URL_PORT

8080 

URL_PATH

demo/cgi_path 

WCS_VERSION

Version=1.0.0  

URL_QUERY_PREFIX

CustomPrefix&CustomMiddle 

URL_QUERY_SUFFIX

CustomSuffix 

The query portion of the URL passed to a WCS server (the parameter=value pairs following the ? character) always includes the following three parameters:

These three parameters are inserted into the URL automatically by IDL; any values specified for these parameters in the URL are ignored. They are not included when the URL_QUERY_PREFIX or URL_QUERY_SUFFIX properties are returned by the GetProperty method. Any query parameters that precede any of the three required parameters will be included in the URL_QUERY_PREFIX property by the ParseURL method; other nonrequired parameters will be included in the URL_QUERY_SUFFIX property.

Note
If not specified in the URL, property values besides URL_HOSTNAME and URL_PATH are set to default values. For example, the URL_PORT property defaults to 80 and the WCS_VERSION defaults to 1.0.0.