Learn R Programming

plotKML (version 0.2-4)

SpatialPredictions-class: A class for spatial predictions produced using gstat package

Description

A class containing input and output maps generated through the process of geostatistical mapping. Object of this class can be directly visualized in Google Earth by using the plotKML-method.

Arguments

References

  • Hengl, T. (2009)http://spatial-analyst.net/book/{A Practical Guide to Geostatistical Mapping}, 2nd Edt. University of Amsterdam, www.lulu.com, 291 p.
  • Hengl, T., Nikolic, M., MacMillan, R.A., (2012)http://dx.doi.org/10.1016/j.jag.2012.02.005{Mapping efficiency and information content}. International Journal of Applied Earth Observation and Geoinformation, special issue Spatial Statistics Conference.

See Also

GSIF::fit.gstatModel, gstat::gstat-class, RasterBrickSimulations-class

Examples

Run this code
# load observations:
data(meuse)
coordinates(meuse) <- ~x+y
proj4string(meuse) <- CRS("+init=epsg:28992")
# load grids:
data(meuse.grid)
gridded(meuse.grid) <- ~x+y
proj4string(meuse.grid) <- CRS("+init=epsg:28992")
# fit a model:
library(GSIF)
omm <- fit.gstatModel(observations = meuse, formulaString = om~dist, 
  family = gaussian(log), covariates = meuse.grid)
show(omm@regModel)
# produce SpatialPredictions:
om.rk <- predict(omm, predictionLocations = meuse.grid)
# overview of the prediction process:
show(om.rk)
# plot the whole geostatical mapping project in Google Earth:
plotKML(om.rk)

Run the code above in your browser using DataLab