Extracting data from the WPS server is a three step process
- Get information about available processes (GetCapabilities)
- Get information about a specific process (DescribeProcess)
- Execute the process (Execute)
GetCapabilities
...
Code Block |
---|
% Server URL url = 'http://dtvirt5.deltares.nl/wps'; % Pass the required paramters xml = urlread(url,'get',{'request','GetCapabilities','service','wps','version','1.0.0'}); % Now we have to save the XML file otherwise we can't use xmlread fid = fopen('file.xml','w'); fwrite(fid, xml); fclose(fid); % Read the XML file we just saved xmldoc = xmlread('file.xml'); % Look up the intersting elements (Processes) offerings = xmldoc.getElementsByTagName('wps:Process'); % Look up all process Identifiers for i = 0:offerings.getLength-1 process = offerings.item(i); identifier = process.getElementsByTagName('ows:Identifier').item(0).getFirstChild.getData end |
...