The IDLnetOGCWMS::ParseUrl procedure method breaks down a given, valid URL to a remote WMS server into component parts and sets the corresponding IDLnetOGCWMS 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 IDLnetOGCWMS properties.

Note: The URL_PATH and URL_HOSTNAME properties must be set before requesting information from a remote WMS 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->[IDLnetOGCWMS::]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 WMS server URL must minimally include scheme://hostname/path? where ? indicates the end of the path.

Keywords


None

Examples


Create an IDLnetOGCWMS 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://mapserv2.esrin.esa.it/cubestor/cubeserv/cubeserv.cgi?
 
 
PRO ogcparseurl_doc
 
; Create OGC WMS object.
oWms = OBJ_NEW("IDLnetOGCWMS")
 
; Enter known working URL at command line to parse.
url = ''
READ, url, PROMPT='Enter URL: '
oWms->ParseUrl, STRING(url)
 
; Get properties to see how URL portions are assigned.
oWms->GetProperty, URL_HOSTNAME=uhost, URL_PATH=upath,$
   URL_PORT=uport, URL_SCHEME=uscheme
 
PRINT, ""
PRINT, "HOST = " + uhost 
PRINT, "PATH = " + upath
PRINT, "PORT = " + uport
PRINT, "SCHEME = " + uscheme
 
; Cleanup. 
OBJ_DESTROY, oWms
 
END

Given the URL noted above, IDL prints:

HOST = mapserv2.esrin.esa.it
PATH = cubestor/cubeserv/cubeserv.cgi
PORT = 80
SCHEME = http

Version History


6.4

Introduced