Jump to: navigation, search

Difference between revisions of "WPS"

Line 28: Line 28:
 
However, Rserve is a stand-alone program, so it can be started directly as well. If you installed Rserve from a source package (on unix), type:
 
However, Rserve is a stand-alone program, so it can be started directly as well. If you installed Rserve from a source package (on unix), type:
 
  R CMD Rserve
 
  R CMD Rserve
 +
Depending on the purpose and libraries on your computer you may want to add --gui-none or --no-save (see R documentation). Rserve passes any parameters to the underlying R engine except for Rserver-related parameters. After initialization Rserve daemonizes itself to work as a server. It can be shut down gracefully (i.e. it will wait until all existing connections are finished) if it recieves shutdown command from an authorized connection.
 +
It terminates not so gracefully if it receives usual termination signals.If no config file is supplied, Rserve accepts no remote connections, requires no authentication and file transfer is enabled. For more details about how to configure Rserve, see [http://www.rforge.net/Rserve/doc.html#conf here].

Revision as of 15:45, 26 April 2013

Installation WPS service from 52°North

  • Download the latest 52n WPS release from here.(If you want the source code, follow this tutorial)
  • Rename the downloaded .war file to wps.war and drop it in the webapps folder of your tomcat.

Configure R

  • Start R, install the package Rserve and the recommended ones with the following command. Add more of them for your own purposes:
install.packages(c("Rserve","sp","maptools","rgdal", "spatstat","gstat","automap"))

Optional

You can use the Rprofile.site file in directory R_HOME%/etc to configure options and packages that should be available on every start of R. To do this, initialize the .First function. Specify required libraries and the default work directory inside the function. These settings will be preloaded during start-up of R:

.First = function() {
#the following libraries will be loaded on R start-up:
library(sp)
library(gstat)
library(rgdal)
library(spatstat)
library(maptools)
library(automap)
#specify the R work directory here:
setwd("<R WD>") # change it!!
}

Configure Rserve

You can start Rserve from within R on your local machine by the following commands:

library(Rserve)
Rserve()

In that case you have to pass that parameter in the args argument such as:

Rserve(args="--no-save")

However, Rserve is a stand-alone program, so it can be started directly as well. If you installed Rserve from a source package (on unix), type:

R CMD Rserve

Depending on the purpose and libraries on your computer you may want to add --gui-none or --no-save (see R documentation). Rserve passes any parameters to the underlying R engine except for Rserver-related parameters. After initialization Rserve daemonizes itself to work as a server. It can be shut down gracefully (i.e. it will wait until all existing connections are finished) if it recieves shutdown command from an authorized connection. It terminates not so gracefully if it receives usual termination signals.If no config file is supplied, Rserve accepts no remote connections, requires no authentication and file transfer is enabled. For more details about how to configure Rserve, see here.