WPS4R
About
WPS4R is a solution for creating WPS processes based on annotated R-scripts. The code was developed in the FP7 projects
UncertWeb and
GeoViQua. The product website can be found at
http://52north.org/wps4r.
WPS admins can upload scripts during runtime. They are stored by the WPS and made available immediately as processes for WPS clients.The scripts are executed by
Rserve, which is an independent TCP/IP Server for R. It has either a local or a remote connection to the WPS and could also run on a different server.
A quick overview of WPS4R is available as a
one page leaflet.
Features
- Easily publish any R scripts as standardized, interoperable web processes
- Flexible geospatial data input and output formats (based on Geotools)
- Automatic metadata generation based on simple annotations
- Service-side resources (files, directories)
- Reproducibility: download original scripts files, session information and resources
Architecture
Desktop or any client applications, such as web apps or services, can control WPS4R processes using the WPS service interface. Script developers can upload annotated scripts using the WPS Web Admin. The sript files and resources are accessible from the standardized process description.
Citation
If you use
WPS4R in scientific publications, we kindly ask you to reference the following paper (
http://www.agile-online.org/Conference_Paper/CDs/agile_2013/Short_Papers/SP_S3.1_Hinz.pdf:
Matthias Hinz, Daniel Nüst, Benjamin Proß, Edzer Pebesma, 2013. Spatial Statistics on the Geospatial Web. Short paper, AGILE 2013.
Bibtex:
@InProceedings{hinzspatial,
Title = {{Spatial Statistics on the Geospatial Web}},
Author = {Hinz, Matthias and N{\"u}st, Daniel and Pro{\ss}, Benjamin and Pebesma, Edzer},
Booktitle = {The 16th AGILE International Conference on Geographic Information Science, Short Papers},
Year = {2013},
Abstract = {The Geospatial Web provides data as well as processing functionality using web interfaces. Typical examples of such processes are models and predictions for spatial data, known as spatial statistics. Such analyses are written by domain experts in scripting languages and rarely exposed as web services. We present a concept of script annotations for automatic deployment in server runtime environments and demonstrate it with an implementation based on the open standards and open source components OGC Web Processing Service and R.},
Journal = {AGILE},
Keywords = {Geoprocessing, R, spatial statistics, WPS, Geospatial Web},
Timestamp = {2014.10.11},
Url = {http://www.agile-online.org/Conference_Paper/CDs/agile_2013/Short_Papers/SP_S3.1_Hinz.pdf}
}
Users and Deployments
Known production deployments
Testing deployments (via mailing list etc.)
Installation
WPS4R is under (very) active development and the current release of the 52°North WPS might not provide the most stable functionality. Also, the tutorials in this wiki are potentially outdated. Please get in touch on the community mailing list if you want to use
WPS4R! Thanks for your understanding.
Instructions
Source Code Installation
WPS4R is completely integrated in the source code of the
52°North WPS. To build and install it from source:
git clone git@github.com:52North/WPS.git
mvn clean install -Pwith-geotools
Binary Download
To
download a 52°North WPS binary with
WPS4R please use the latest successful nightly build:
http://build.dev.52north.org/jenkins/job/52n-wps_TRUNK_nightly_builds/lastSuccessfulBuild/
Documentation
Development
For information about on-going development, getting the source code and contributing to
WPS4R please see
WPS4RDevelopment.
Changes
- WPS 3.2.0
- Integration Tests
- R warnings are included in execute response
- R sessionInfo() can be inspected in the admin console
- Validity of process descriptions is shown in backend configuration
- ...
Demo
The
WPS webapp module contains several example scripts for
WPS4R that should almost run out of the box (some R packages must be installed beforehand). Just activate the R repository in your wpsconfig file.
See
https://github.com/52North/WPS/tree/master/52n-wps-webapp/src/main/webapp/R.
Support
If you have questions regarding R scripts and the R integration, please contact the Geostatistics Community mailing list (Email:
org, Forum:
http://geostatistics.forum.52north.org/). If your enquiry focusses on the WPS interface or the Java code, please direct your question to the Geopocessing Community mailing list (Email:
org, Forum:
http://geoprocessing.forum.52north.org/).
Either way, the developers will get your message and try to help you! Please take a look at existing discussions first, for example using the respective forums. Thanks!
All information about the 52N mailing lists and forums:
http://52north.org/resources/mailing-list-and-forums/
Troubleshooting
Rserve
To make sure Rserve is running, test your Rserve connection by typing the following command:
telnet localhost 6311
You should get output containing "Connected to localhost.". You can return to the prompt by hiting the enter key.
Linux/Ubuntu
"Cannot start Rserve automatically"
The command
R CMD Rserve --vanilla
is used to start R under Linux. Please check that on a command line. If it does not work either, please install r-cran-rserve, so install Rserve from the Ubuntu repositories instead of CRAN.