Representation of a WPS process. Usually instances of OpenLayers.WPSProcess are created by calling ‘getProcess’ on an OpenLayers.WPSClient instance.
Currently OpenLayers.WPSProcess supports processes that have geometries or features as output, using WKT or GeoJSON as output format. It also supports chaining of processes by using the output method to create a handle that is used as process input instead of a static value.
OpenLayers.
|
Representation of a WPS process. |
Properties | |
localWPS | {String} Service endpoint for locally chained WPS processes. |
Constructor | |
OpenLayers.
|
|
Functions | |
configure | Configure the process, but do not execute it. |
execute | Configures and executes the process |
output | Chain an output of a configured process (see configure) as input to another process. |
OpenLayers.
|
Type for chaining processes. |
Constructor | |
OpenLayers.
|
{String} Service endpoint for locally chained WPS processes. Default is ‘http://geoserver/wps’.
options | {Object} Object whose properties will be set on the instance. |
client | {OpenLayers.WPSClient} Mandatory. Client that manages this process. |
server | {String} Mandatory. Local client identifier of this process’s server. |
identifier | {String} Mandatory. Process identifier known to the server. |
configure: function( options )
Configure the process, but do not execute it. Use this for processes that are chained as input of a different process by means of the output method.
options | {Object} |
{OpenLayers.WPSProcess} this process.
inputs | {Object} The inputs for the process, keyed by input identifier. For spatial data inputs, the value of an input is usually an OpenLayers.Geometry, an OpenLayers.Feature.Vector or an array of geometries or features. |
callback | {Function} Callback to call when the configuration is complete. Optional. |
scope | {Object} Optional scope for the callback. |
execute: function( options )
Configures and executes the process
options | {Object} |
inputs | {Object} The inputs for the process, keyed by input identifier. For spatial data inputs, the value of an input is usually an OpenLayers.Geometry, an OpenLayers.Feature.Vector or an array of geometries or features. |
output | {String} The identifier of the output to request and parse. Optional. If not provided, the first output will be requested. |
success | {Function} Callback to call when the process is complete. This function is called with an outputs object as argument, which will have a property with the identifier of the requested output (or ‘result’ if output was not configured). For processes that generate spatial output, the value will be an array of OpenLayers.Feature.Vector instances. |
scope | {Object} Optional scope for the success callback. |
output: function( identifier )
Chain an output of a configured process (see configure) as input to another process.
intersect = client.getProcess('opengeo', 'JTS:intersection'); intersect.configure({ // ... }); buffer = client.getProcess('opengeo', 'JTS:buffer'); buffer.execute({ inputs: { geom: intersect.output('result'), // <-- here we're chaining distance: 1 }, // ... });
identifier | {String} Identifier of the output that we’re chaining. If not provided, the first output will be used. |
Configure the process, but do not execute it.
configure: function( options )
Configures and executes the process
execute: function( options )
Chain an output of a configured process (see configure) as input to another process.
output: function( identifier )