You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 26 Next »

In this primer we will demonstrate how to access and execute a remote prosessing service using the OGC Web Processing Service (WPS) protocol. 

Find a WPS server

Find a data web source that hosts a WPS server, Deltares hosts a test server at http://dtvirt5.deltares.nl/wps/?

Request an overview of the capabilities of a WPS server

Ask for what the server has to offer

keyword

value

source

service

WPS

Mandatory WPS standard value

version

1.0.0

Optional for GetCapabilities

request

GetCapabilities

Mandatory WPS standard value

language

Usually 'en' (English)

Optional

http://dtvirt5.deltares.nl/wps/?
Request=GetCapabilities&
Service=WPS

This url will return an xml file that contains an inventory of the available processes.

Inspect the overview of the content of a WPS server

Look at which WPS processes the server has to offer. For each process there is a tag ows:identifier with an identifier and title of the process, as shown in the reduced xml file example below:

<wps:Capabilities xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:wps="http://www.opengis.net/wps/1.0.0" xmlns:ows="http://www.opengis.net/ows/1.1"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" service="WPS" version="1.0.0" xml:lang="en-CA" xsi:schemaLocation="http://www.opengis.net/wps/1.0.0 http://schemas.opengis.net/wps/1.0.0/wpsGetCapabilities_response.xsd" updateSequence="1">
<ows:ServiceIdentification>
...
</ows:ServiceIdentification>
<ows:ServiceProvider>
...
</ows:ServiceProvider>
...
<ows:HTTP>
<ows:Get xlink:href="http://dtvirt5.deltares.nl/wps?"/>
<ows:Post xlink:href="http://dtvirt5.deltares.nl/wps"/>
</ows:HTTP>
...
<wps:ProcessOfferings>

<wps:Process wps:processVersion="0.1">
<ows:Identifier>ogrbuffer</ows:Identifier>
<ows:Title>Buffer process using OGR</ows:Title>
</wps:Process>
...
<wps:Process wps:processVersion="1">
<ows:Identifier>constituents</ows:Identifier>
<ows:Title>Lookup constituents based on their short name</ows:Title>
</wps:Process>

<wps:Process wps:processVersion="0.1">
<ows:Identifier>IDT_simple</ows:Identifier>
<ows:Title>Interactive Dredge Planning Tool</ows:Title>
</wps:Process>

<wps:Process wps:processVersion="1">
<ows:Identifier>status_test</ows:Identifier>
<ows:Title>echo</ows:Title>
<ows:Abstract>Echo server</ows:Abstract>
</wps:Process>

</wps:ProcessOfferings>
...
</wps:Capabilities>

Request a specific process of the WPS server

Where the GetCapabilities request returns a full summary of the server's capatbilities, the DescribeProcess request returns specific information on a single process. 

keyword

value

source

service

WPS

Mandatory WPS standard value

version

1.0.0

Mandatory for DescribeProcess

request

DescribeProcess

Mandatory WPS standard value

identifer

process name

Mandatory parameter

language

Usually 'en' (English)

Optional

http://geoprocessing.demo.52north.org:8080/wps/WebProcessingService?
Request=DescribeProcess&
Service=WPS&
version=1.0.0&
identifier=org.n52.wps.server.algorithm.spatialquery.TouchesAlgorithm

This url will return an xml file that contains a description of the requested processes.

<wps:ProcessDescriptions xmlns:wps="http://www.opengis.net/wps/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ows="http://www.opengis.net/ows/1.1" xsi:schemaLocation="http://www.opengis.net/wps/1.0.0 http://schemas.opengis.net/wps/1.0.0/wpsDescribeProcess_response.xsd" xml:lang="en-US" service="WPS" version="1.0.0"><wps:ProcessDescriptions xmlns:wps="http://www.opengis.net/wps/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ows="http://www.opengis.net/ows/1.1" xsi:schemaLocation="http://www.opengis.net/wps/1.0.0 http://schemas.opengis.net/wps/1.0.0/wpsDescribeProcess_response.xsd" xml:lang="en-US" service="WPS" version="1.0.0">
<ProcessDescription statusSupported="true" storeSupported="true" wps:processVersion="1.0.0">
<ows:Identifier>
org.n52.wps.server.algorithm.spatialquery.TouchesAlgorithm
</ows:Identifier>
<ows:Title>
org.n52.wps.server.algorithm.spatialquery.TouchesAlgorithm
</ows:Title>
<DataInputs>
<Input minOccurs="1" maxOccurs="1">
<ows:Identifier>LAYER1</ows:Identifier>
<ows:Title>LAYER1</ows:Title>
<ComplexData>
<Default>
<Format>
...
<MimeType>text/xml</MimeType>
<Schema>
<Format>
<MimeType>text/xml</MimeType>
<Schema>http://www.opengeospatial.org/gmlpacket.xsd</Schema>
</Format>
</Schema>
...
</Supported>
</ComplexData>
</Input>
</DataInputs>
<ProcessOutputs>
<Output>
<ows:Identifier>RESULT</ows:Identifier>
<ows:Title>RESULT</ows:Title>
<ows:Abstract>RESULT</ows:Abstract>
<LiteralOutput>
<ows:DataType ows:reference="xs:boolean"/>
</LiteralOutput>
</Output>
</ProcessOutputs>
</ProcessDescription>
</wps:ProcessDescriptions>
<ProcessDescription statusSupported="true" storeSupported="true" wps:processVersion="1.0.0">

Execute a specific process of the WPS server

After finding out the required input parameters for the specific process, the Execute request can be send. 

keyword

value

source

service

WPS

Mandatory WPS standard value

version

1.0.0

Mandatory for Execute

request

Execute

Mandatory WPS standard value

identifer

process name

Mandatory parameter

DataInputs

inpute parameters

Mandatory for Execute

language

Usually 'en' (English)

Optional

Since processes can contain multiple inputs, the DataInputs parameter looks somewhat different. The shape of this parameter is shown below. The different parameters are all after the equal (=) sign of datainputs and between brackets. The different parameters are separated by semicolons (;).

 datainputs=[parameter_1=5;parameter_2=9;parameter_3=false]
  • No labels