intamap-package
to be used for interpolation within the intamap-packagecreateIntamapObject(observations, obsChar, formulaString,
predictionLocations=100, targetCRS, boundaries, boundaryLines,
intCRS, params=list(), boundFile, lineFile, class="idw",
outputWhat, blockWhat = "none",...)z,
for ordinary and simple kriging use the formula z~1;
for universal kriging, sSpatial* object with
prediction locations or an integer with the requested number
of prediction locations. If boundaries are supporteSpatialPolygonsDataFrame with the boundaries
of regions in the prediction regionSpatialPointsDataFrame with the boundaries between
pairs of regions discretized as points.
Will be read from file if getIntamapParamsintamap-packageclass, and methods in the
intamap-package will dispatch on the
object according to this class.intamap-package) for interpolation within the
intamap-package.
The function uses some default values if certain elements are not included.
If createIntamapObject is called without predictionLocations, or if a number
is given, the function will sample a set of predictionLocations. These will
be sampled from a regular grid.
targetCRS and intCRS are not mandatory variables, but are recommended if the user wants predictions of a certain projection. intCRS is not necessary if the targetCRS is given and has a projection (is not lat-long). It is recommended to include the argument intCRS if all projected elements are lat-long, as many of the interpolation methods do not work optimal with lat-long data.
The ...-argument can be used for arguments necessary for new methods not being
a part of the intamap-package. It is also a method for reusing previously calculated
elements that can be assumed to be unchanged for the second interpolation.
intamap-package and getIntamapParamslibrary(intamap)
# set up data:
data(meuse)
coordinates(meuse) = ~x+y
meuse$value = log(meuse$zinc)
data(meuse.grid)
gridded(meuse.grid) = ~x+y
proj4string(meuse) = CRS("+init=epsg:28992")
proj4string(meuse.grid) = CRS("+init=epsg:28992")
# set up intamap object:
idwObject = createIntamapObject(
observations = meuse,
predictionLocations = meuse.grid,
targetCRS = "+init=epsg:3035",
class = "idw"
)Run the code above in your browser using DataLab