4. WPS - Web Processing Service

This documentation is no longer maintained. Please see the new GeoServer documentation at http://docs.geoserver.org

compared with
Current by Jody Garnett
on Jun 25, 2010 00:35.


 
Key
These lines were removed. This word was removed.
These lines were added. This word was added.

View page history


There are 6 changes. View first change.

 h2. General
  
 {warning:title=Unsupported}
 The WPS module is currently a work-in-progress and not supported as part of the standard GeoServer configuration.
 {warning}
 GeoServer currently provides partial support for the Open Geospatial Consortium Web Processing Service 1.0 standard via a community module.
 \\
  
 WPS is a service for advertising, binding, and performing computations with web-accessible resources and systems.
  
 [http://www.opengeospatial.org/standards/wps]
  
 In recent months Andrea Aime has been working with Victor Olaya on integrating [SEXTANTE|http://www.sextantegis.com/en/index.htm]'s 220\+ Geospatial Algorithms in to GeoTools and the GeoServer WPS.
  
 The motivation behind doing WPS as a direct plug-in to GeoServer is to allow it to avoid the performance bottleneck that plagues most existing WPS's - the production and parsing of GML and large image files. GeoServer will enable the processing to happen right when it reads the data from the database. This should help move WPS from a proof of concept to a powerful tool that's useful in a production environment.
  
 h2. Building and Running
  
 The current work is taking place on the 1.7.x branch with the future aim of forward porting it to trunk.
  
 In order to build GeoServer with the WPS module enabled, GeoTools must first be built with the Process API enabled.
 Instructions for building GeoTools can be found here:
  
 [http://docs.codehaus.org/display/GEOTDOC/Process+API]
  
 To enable WPS support, build GeoServer as usual, except enable the WPS Maven profile with the \-Pwps option for the compile, install, and run steps as shown below.
 {code}
shell% mvn compile -Pwps
  %> mvn install -Pwps
 ...
shell% mvn install -Pwps
  %> cd web/app
 ...
shell% mvn jetty:run -Pwps
  %> mvn jetty:run -Pwps
 {code}
 
 Once you have GeoServer built and running there are three WPS operations that can be executed via a web browser.
  
 If you are running GeoServer and a web browser on the same system the following links should give you XML response documents.
  
 These instructions were tested and are known to work on the geoserver 1.7.x branch SVN revision 9616.
  
 For a more detailed description of the GeoServer build process in general refer to the Maven quickstart guide.
  
 [http://geoserver.org/display/GEOSDOC/2+Maven+Quickstart]
  
 h2. GetCapabilities Operation
  
 The GetCapabilities operation returns all the algorithms that the WPS module supports.
  
 [http://localhost:8080/geoserver/ows?service=WPS&request=GetCapabilities]
  
 Example response:
  
 [http://schemas.opengis.net/wps/1.0.0/examples/20_wpsGetCapabilities_response.xml]
  
 h2. DescribeProcess Operation
  
 The DescribeProcess operation returns detailed information about one or more algorithms. To specify which algorithms are to be described a comma separated list of identifiers is provided as the Identifier argument. Alternatively the special identifier 'all' can be supplied to return all algorithms supported by the WPS module.
  
 [http://localhost:8080/geoserver/ows?service=WPS&request=DescribeProcess&identifier=Intersect,Union]
  
 [http://localhost:8080/geoserver/ows?service=WPS&request=DescribeProcess&identifier=all]
  
 Example response:
  
 [http://schemas.opengis.net/wps/1.0.0/examples/40_wpsDescribeProcess_response.xml]
  
 h2. Execute Operation
  
 A XML request document is submitted with the inputs either included or references to web-accessible external resources specified. The current implementation supports only results returned in the response XML document, rather than placed in a web-accessible location for separate fetching.
  
 Execute requests are submitted via the POST method and as such require a slightly more complicated way to demonstrate them. GeoServer has a built in request demo page:
  
 [http://localhost:8080/geoserver/demoRequest.do]
  
 0: Don't select anything from the dropdown 'Request' list.
 1: Enter [http://localhost:8080/geoserver/ows] into the URL field if you are running GeoServer on the same system.
 2: Copy and paste the example request below into the 'Body' text area.
 3: Leave the other fields blank and click Submit.
 4: You sould get something very similar to the below example response.
  
 Example request:
 {code}
 <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
 <wps:Execute service="WPS" version="1.0.0"
  xmlns:wps="http://www.opengis.net/wps/1.0.0"
  xmlns:ows="http://www.opengis.net/ows/1.1"
  xmlns:xlink="http://www.w3.org/1999/xlink"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.opengis.net/wps/1.0.0 ../wpsExecute_request.xsd">
  <ows:Identifier>DoubleAddition</ows:Identifier>
  <wps:DataInputs>
  <wps:Input>
  <ows:Identifier>input_a</ows:Identifier>
  <wps:Data>
  <wps:LiteralData>7</wps:LiteralData>
  </wps:Data>
  </wps:Input>
  <wps:Input>
  <ows:Identifier>input_b</ows:Identifier>
  <wps:Data>
  <wps:LiteralData>7</wps:LiteralData>
  </wps:Data>
  </wps:Input>
  </wps:DataInputs>
  <wps:ResponseForm>
  <wps:ResponseDocument storeExecuteResponse="false">
  <wps:Output asReference="false">
  <ows:Identifier>result</ows:Identifier>
  </wps:Output>
  </wps:ResponseDocument>
  </wps:ResponseForm>
 </wps:Execute>
 {code}
 Example response:
 {code}
 <?xml version="1.0" encoding="UTF-8"?>
 <wps:ExecuteResponse service="WPS" version="1.0.0"
  xmlns:wps="http://www.opengis.net/wps/1.0.0"
  xmlns:gml="http://www.opengis.net/gml"
  xmlns:ows="http://www.opengis.net/ows/1.1"
  xmlns:xlink="http://www.w3.org/1999/xlink">
  <wps:Process wps:processVersion="1.0.0">
  <ows:Identifier>DoubleAddition</ows:Identifier>
  <ows:Title>DoubleAddition</ows:Title>
  </wps:Process>
  <wps:Status creationTime="2008-07-09T17:02:22.765Z">
  <wps:ProcessSucceeded>Process completed successfully.</wps:ProcessSucceeded>
  </wps:Status>
  <wps:ProcessOutputs>
  <wps:Output>
  <ows:Identifier>result</ows:Identifier>
  <ows:Title>Result value</ows:Title>
  <wps:Data>
  <wps:LiteralData dataType="xs:double">14.0</wps:LiteralData>
  </wps:Data>
  </wps:Output>
  </wps:ProcessOutputs>
 </wps:ExecuteResponse>
 {code}
View Attachments (0) Info