The IDLnetOGCWCS::ParseUrl procedure method breaks down a given, valid URL to a remote WCS server into component parts and sets the corresponding IDLnetOGCWCS properties. This method will set the following properties assuming a URL has each component:

URL_HOSTNAME

URL_SCHEME

URL_PATH

URL_QUERY_PREFIX

URL_PORT

URL_QUERY_SUFFIX

See Translating a URL into Property Values for more information on how URL components map to IDLnetOGCWCS properties.

Note: The URL_PATH and URL_HOSTNAME properties must be set before requesting information from a remote WCS server. You can either set these properties manually or pass a URL to this method prior to making a request.

This method will throw an error if the parsing process fails. Always use a known, working URL as the argument.

Syntax


Obj->[IDLnetOGCWCS::]ParseUrl, URL

Arguments


URL

A string argument containing a known, working URL to an OGC server from which data will be requested.

Note: A valid WCS server URL must minimally include scheme://hostname/path? where ? indicates the end of the path.

Keywords


None

Examples


Create an IDLnetOGCWCS object and call the ParseURL method to populate required properties. In this example use a URL of your choosing or input the following, entered as a single line at the command prompt when requested.

http://217.37.214.210/cgi-bin/test?REQUEST=DescribeCoverage&Service=WCS&Coverage=ERA__Temperature

Note: You may need to use a different 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.

PRO ogcparseurl_doc
 
; Create OGC WCS object.
oWcs = OBJ_NEW("IDLnetOGCWCS")
 
; Enter known working URL at command line to parse.
v=dialog_message("Enter URL at command prompt", /INFO)
url = ''
READ, url, PROMPT='Enter URL: '
oWcs->ParseUrl, STRING(url)
 
; Get properties to see how URL portions are assigned.
oWcs->GetProperty, URL_HOSTNAME=uhost, URL_PATH=upath,$
   URL_PORT=uport, URL_SCHEME=uscheme, $
   URL_QUERY_PREFIX=uprefix, URL_QUERY_SUFFIX=usuffix
 
PRINT, "HOST = " + uhost 
PRINT, "PATH = " + upath
PRINT, "PORT = " + uport
PRINT, "SCHEME = " + uscheme
PRINT, "PREFIX = " + uprefix
PRINT, "SUFFIX = " + usuffix
 
; Cleanup. 
OBJ_DESTROY, oWcs
 
END

Given the URL noted above, IDL prints:

host = 217.37.214.210
path = cgi-bin/test
port = 80
scheme = http
prefix = 
suffix = Coverage=ERA__Temperature

Version History


6.4

Introduced