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
vCancelFlag = 1
RETURN, vCancelFlag
END
PRO ogc_wcs_getcoverbriefs_doc
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, 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
oWcs = OBJ_NEW("IDLnetOGCWCS", $
CALLBACK_FUNCTION="ogcwcs_callback")
oWcs->ParseUrl, url
count = oWCS->GetCapabilities()
If (count NE 0) THEN BEGIN
briefStruct = oWCS->GetCoverageOfferingBriefs $
(COUNT=briefcount, NUMBER=5, INDEX = 1)
PRINT, "Returning structures for ", + briefcount, + " briefs"
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
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
OBJ_DESTROY, oWcs
END
Version History
See Also
IDLnetOGCWCS::GetCapabilities, IDLnetOGCWCS::GetServiceSection