WPS Client for OpenLayers
's WMS, WFS,...) into a Web page or application.
The client can be used inside a local domain or by using a proxy the WPS services can be located outside the HTTP servers domain. The project includes a proxy, which can be run in an servlet container (i.e. Apache Tomcat
). An alternative is to use the proxy located in the OpenLayers repository (cqi-bin). The proxy has to be run in the same domain, which provides the Web page or application using the client.
- WPS 1.0.0 specification compliant for the implemented parts.
- The client can access remote domains using a proxy.
- Possibility to use (switch between) multiple WPS services. However, only one service can be used at a time for the same process call (No gridding ).
- Process calls can run simultaneously (as they are asynchronous). Although, there is currently no reason for this, as only the latest arrived process result will be shown to the user!
- Processed feature data can be reprocessed.
- The client includes a new OpenLayers layer, which stores the GML data resulting from a process. The layer extends OpenLayers.Layer.Vector.
- The previous process has to return the data directly. Reprocessing of referenced data is still unimplemented.
- Supports GML2 and GML3 as far as OpenLayers does (Simple features with some restrictions).
- Implemented using the POST method (XML-encoding).
- WMS and WFS data is given as a reference to the original source.
- The area of the map is used to filter the WMS and WFS queries.
- The CRS of the source layer is attached to the WMS and WFS queries.
- If the process supports GML2 then by default GML2 data is queried from the WFS.
- In case of reprocessing, the GML data is given directly to the process.
- The area of the map is not used -> The result might not show on the map!
- Supports status.
- By default the status report is wanted from the process.
- A new status report is queried every 5 seconds.
- Automatic termination of status queries based on a static maximum time. Currently the maximum time is 2 minutes from the last update of the status report.
- The GML data of the process response is converted/transformed to the same CRS as the map layer.
- To determine the external CRS the first encountered srsName is searched.
- The results of processes are always shown in the same layer.
- This could be changed by adding for each process result a new layer, but then the HTML page should include the possibility of removing layers!
- GML2 schema is the default in the process output format.
The GetCapabilities- and DescribeProcess-operations
- Implemented using the GET method (KVP-encoding).
- The WPS Execution-operation's request and response texts can be attached to an external HTML text area. This is done via the initialization options of the client. The text areas can be used for demonstration and debugging.
Download OpenLayers sources, Sarissa and Proj4.js. Add to the OpenLayers\lib
(or for instance proj4js-compressed.js
Download the client from the 52North's SVN
. Add from the client's lib
folder all files to OpenLayers\lib
(Do not change the folder hierarchy). Now build OpenLayers by running OpenLayers\build\build.py
Add the created OpenLayers.js
to a location, which you can refer to from the Web page and include the OpenLayers.js
in the Web page's header section.
Add the necessary code to initialize OpenLayers and in addition to those controls that you want to use add OpenLayers.Control.WPSClient
If you can't or do not want to use the cqi-bin script located in the OpenLayers repository you can use the WPS-Proxy servlet located in the client sources.
Building the proxy and using it with Apache Tomcat can done by
- Use Maven to compile and install the WPS-Proxy.
- Configure the properties file.
- If necessary change the list of allowed host addresses and ports.
- The ports are allowed for each host!
- The default ports include 80 and 8080.
- Add the wps_proxy.war to the webapps folder of Apache Tomcat and start Apache Tomcat.
The sources for the plug-in are hosted on the 52North's SVN server. The sources can be downloaded from here
The OpenLayers WPS client is composed of 4 files. These are
Initialization sequence of the WPS client for OpenLayers
WPS's Execution-operations's sequence while using the WPS client for OpenLayers
As the project is in incubator stage, there are still several unimplemented parts and unsolved problems
- Reprocessing of referenced data is still unimplemented. Needs a new layer that extends the OpenLayers.Layer.GML and stores the reference or referenced data.
- Execute operation handling should check what the schema of processed data is, and if the second process supports the schema.
- Some failure situations are unimplemented.
- Some functions are undocumented.
- Is this needed? In my opinion is needed for at least debugging (optional).
- SOAP and WSDL
- GetCapabilities- and DescribeProcess-operations
- POST-method unimplemented
- A nice feature would be to allow the user to select another method than the default one for testing purposes.
- Execute-operation's query
- GET-method has been only partly implemented.
- getElementsByTagName functions should be changed in several places to getElementsByTagNameNS to take the namespaces into account.
- Units of Measure (UoM) is unimplemented.
- Continuous values as AllowedValues are unimplemented.
- Value reference is unimplemented.
- Should be tested.
- None of current processes produce literal output!
- Execute queries should be monitored, but the current WPS specification (version 1.0.0) does not yet allow this as the process queries are not identified.
- Terminating Execute-calls unimplemented. Needs monitoring.
- Exception handling
- Only the latest exception is shown under the inputs in red ... and even that can be overridden by some asynchronous response message!
- Log or showing multiple info messages is needed.
- Should be implemented in a better way.
- Input & output is unimplemented.
- Output is unimplemented.
- WMS calls should be implemented & tested.
- None other than UTF-8 have not been taken into account.
- Testing, testing, testing,
Examples / Screenshots
OpenLayers interface with road vectors before running any operations
Roads after running the buffering with a distance of 15 meters
Roads (in red) after the Douglas Peucker simplification algorithm (Tolerance 15 meters)
The client control opened and btw. a road seems to go through my apartment
- 18 Jun 2008