WPS-class {GSIF}R Documentation

A class for a Web Processing Service

Description

A class for a Web Processing Service. Can be used to overlay points or fetch grid values for rasters located remotely on a server and specified via the inRastername slot.

Slots

server:

object of class "list"; contains the location of the CGI script that executes WPS ("URI"); service name ("service.name"), version ("version"), request type ("request"), identifier ("identifier")

inRastername:

object of class "character"; name of the objects on the server

Methods

show

signature(object = "WPS"): gets the complete server capabilities

getProcess

signature(x = "WPS"): gets a list of processes available from a server

describe

signature(x = "WPS"): lists parameters specific to some service identifier

over

signature(x = "WPS", y = "SpatialPoints"): overlays spatial points and the target grids defined via the WPS-class (point-by-point)

subset

signature(x = "WPS"): subsets a grid (from server) and loads it to R; use bbox argument to specify the bounding box

Note

More examples of overlay, subset and aggregation functions are available via WorldGrids.org. WPS WorldGrids.org uses the PyWPS module on a Debian system with Webserver, GDAL, Python and Scipy. The standard format for the gridded data on the WorldGrids.org repository is "GeoTiff". Use of the "bbox" object to obtain grids that cover more than 30 percent of the global coverage is not recommended. Consider instead downloading the compressed images directly from WorldGrids.org.

Author(s)

Tomislav Hengl & Hannes I. Reuter

References

See Also

landmask

Examples

## Not run: 
library(XML)
library(sp)
URI = "http://wps.worldgrids.org/pywps.cgi"
server <- list(URI=URI, request="execute", 
    version="version=1.0.0", service.name="service=wps", 
    identifier="identifier=sampler_local1pt_nogml")
glcesa3.wps <- new("WPS", server=server, inRastername="glcesa3a")
# show(biocl15.wps)
prl <- getProcess(glcesa3.wps)
prl[7]
describe(glcesa3.wps, identifier="overlay")
p1 <- data.frame(lon=15, lat=15)
coordinates(p1) <- ~lon+lat
proj4string(p1) <- CRS("+proj=longlat +datum=WGS84")
p1
over(glcesa3.wps, p1)
# fetch grids and load the to R:
glcesa3 <- subset(glcesa3.wps, bbox=matrix(c(20,40,22,42), nrow=2))
image(glcesa3)

## End(Not run)

[Package GSIF version 0.5-5 Index]