The IDLnetOGCWCS::GetCoverageOfferingBriefs function method provides access to the coverage offering briefs that were returned and parsed by the IDLnetOGCWCS::GetCapabilities method. You can return all coverage offering briefs or a subset of the briefs, which can be useful when:

  • A large number of briefs would require significant amounts of memory to return all of them at a single time
  • A user interface needs to display a subset of the available items

This method will throw an error if the GetCoverageOfferingBriefs call fails.

Note: Use IDLnetOGCWCS::GetServiceSection to return information related to the service section of the coverage offering briefs.

Syntax


Result = Obj->[IDLnetOGCWCS::]GetCoverageOfferingBriefs ([, COUNT=variable], [, NUMBER=value] [, INDEX=value])

Return Value


The return value is an array of structures containing one or more coverage offering briefs. Use the COUNT keyword to verify that briefs are available since the returned value can be zero when briefs are not available. All elements are strings unless otherwise noted.

Field Name

Description

INDEX

A zero-based string index value provided as a convenience. This does not come from the XML file.

NAME

XML source: <CoverageOfferingBrief><name>

LABEL

XML source: <CoverageOfferingBrief><label>

SRS_NAME

XML source: <CoverageOfferingBrief><lonlatEnvelope><srsName>

DIMS1

XML source: <CoverageOfferingBrief><lonlatEnvelope><dimension>

DIMS2

XML source: <CoverageOfferingBrief><lonlatEnvelope><dimension>

POS1

XML source: <CoverageOfferingBrief><lonlatEnvelope><gml:pos>

POS2

XML source: <CoverageOfferingBrief><lonlatEnvelope><gml:pos>

TM_POS1

XML source: <CoverageOfferingBrief><lonlatEnvelope>
<gml:timePosition>

TM_POS2

XML source: <CoverageOfferingBrief><lonlatEnvelope> <gml:timePosition>

KEYWORDS

Array of strings containing a list of keywords.

XML source: <CoverageOfferingBrief><keywords><keyword>

DESCRIPTION

XML source: <CoverageOfferingBrief><description>

VERSION

XML source: <WCS_Capabilities><version>

UPDATE_SEQ

XML source: <WCS_Capabilitiesf><updateSequence>

Arguments


None

Keywords


COUNT

Set this keyword to a variable that will contain the number of brief structures returned in this method’s structure array. This value can be zero.

NUMBER

Set this keyword to the number of coverage offering briefs to return. If this keyword is not set, all briefs will be returned minus the number of those skipped up to the INDEX keyword, if it is set. If this value is zero, zero briefs will be returned. If the value is greater than the number of available briefs, then this value is ignored and the number of available briefs (COUNT) is returned.

Note: When populating a user interface, it is useful to set this keyword equal to the number of rows in the table.

INDEX

Set this keyword to the zero-based number of the first coverage offering brief to return, skipping over all preceding briefs. If this keyword is not set, all briefs will be returned. You can use this property to enable navigation through a list of briefs displayed in a user interface. For example, suppose there are 10 rows in a table. On the first call to GetCoverageOfferingBriefs, set this value to 0. To display the next set of values, you would set this keyword to 10 (skip the first 10 values and display the next ten.

Examples


The following code parses the URL of a ICEDS WCS server, queries its capabilities (using GetCapabilities) and then extracts information from the returned XML file using GetCoverageOfferingBriefs and GetServiceSection. Information is printed to the Output log.

Note: You may need to replace the URL in the following example as there is no guarantee that the given OCG server will be available when you attempt to establish the connection.

FUNCTION ogcwcs_callback,  StatusInfo, CallbackData
 
PRINT, StatusInfo
 
; Indicate all is well.
vCancelFlag = 1
RETURN, vCancelFlag
 
END
 
PRO ogc_wcs_getcoverbriefs_doc
 
; Use the GetCoverageOfferingBriefs to access data returned in
; the XML file by the GetCapabilities method.
 
; This example queries an OGC server at the following URL. Change 
; the value of this variable to access a server of your choice. 
url="http://mydataserver.com:80/cgi-bin" + $ 
   "/mapserv.exe?MAP=/OGC_Data/WCS/wcs_demo.map" + $
   "&SERVICE=WCS&VERSION=1.0.0&REQUEST=GetCapabilities"
 
; Catch error.
CATCH, errorStatus
IF (errorStatus NE 0) THEN BEGIN
   CATCH,/CANCEL
   r = DIALOG_MESSAGE(!ERROR_STATE.MSG, TITLE='OGC WCS Error', $
      /ERROR)
   PRINT, !ERROR_STATE.MSG
   IF OBJ_VALID(oWcs) THEN OBJ_DESTROY, oWcs
   RETURN
ENDIF
 
; Create an IDLnetOGCWCS object and parse a known, working URL to
; set mandatory properties.
oWcs = OBJ_NEW("IDLnetOGCWCS", $
   CALLBACK_FUNCTION="ogcwcs_callback")
oWcs->ParseUrl, url
 
; Return and parse a brief description of all data holdings on 
; the WCS server.
count = oWCS->GetCapabilities()
 
; Make sure the server returned some coverage offering briefs.
If (count NE 0) THEN BEGIN
 
   ; Use the GetCoverageOfferingBriefs method to translate the 
   ; parsed XML data into an array of IDL structures. The NAME 
   ; field of this structure is used to identify what coverage to
   ; get more information about using the DescribeCoverage method.
   briefStruct = oWCS->GetCoverageOfferingBriefs $
      (COUNT=briefcount, NUMBER=5, INDEX = 1)
   PRINT, "Returning structures for ", + briefcount, + " briefs"
 
   ; Access elements of the GetCoverageOfferingBriefs structure.
   FOR x=0, briefCount-1 DO BEGIN
      PRINT, 'CoverageOfferingBrief = ', strtrim(x,2)
      PRINT, '  name             = ', briefStruct[x].name
      PRINT, '  label            = ', briefStruct[x].label
      PRINT, '  srs name         = ', briefStruct[x].srs_name
      PRINT, '  pos1             = ', briefStruct[x].pos1
      PRINT, '  pos2             = ', briefStruct[x].pos2
   ENDFOR
 
   ; Use the GetServiceSection method to get the Service section
   ; data from the XML file containing the coverage offering
   ; briefs.
   serviceStruct = oWCS->GetServiceSection()
 
   PRINT, 'Service Section'
   PRINT, '  name              = ', serviceStruct.name
   PRINT, '  label             = ', serviceStruct.label
   PRINT, '  fees              = ', serviceStruct.fees
   HELP, serviceStruct.keywords
   PRINT, '  keywords          = ', serviceStruct.keywords
   PRINT, '  accessConstraints = ', serviceStruct.access
ENDIF ELSE BEGIN
   void = DIALOG_MESSAGE("No information available " $
      + "from WCS Server", /ERROR)
   RETURN   
ENDELSE
 
; Cleanup.
OBJ_DESTROY, oWcs
 
END

Version History


6.4

Introduced

See Also


IDLnetOGCWCS::GetCapabilities, IDLnetOGCWCS::GetServiceSection