Learn R Programming

GSIF (version 0.3-1)

WPS-class: 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.

Arguments

References

  • PyWPS module (http://pywps.wald.intevation.org)
  • WorldGrids.org (http://worldgrids.org)

See Also

landmask

Examples

Run this code
library(XML)
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)

Run the code above in your browser using DataLab