createIntamapObject {intamap} | R Documentation |
This is a help function for creating an object (see intamap-package
to be used for interpolation within the intamap-package
createIntamapObject(observations, obsChar, formulaString, predictionLocations=100, targetCRS, boundaries, boundaryLines, intCRS, params=list(), boundFile, lineFile, class="idw", outputWhat, blockWhat = "none",...)
observations |
a
SpatialPointsDataFrame ,
SpatialPixelsDataFrame ,
SpatialGridDataFrame ,
SpatialLinesDataFrame or
SpatialPolygonsDataFrame with observations. Note that there
are only few methods that can actually handle interpolation of
observations with a support |
obsChar |
list with observation characteristics, used by some interpolation methods |
formulaString |
formula that defines the dependent variable as a linear model
of independent variables; suppose the dependent variable has name z ,
for ordinary and simple kriging use the formula z~1 ;
for universal kriging, suppose z is linearly dependent on
x and y , use the formula z~x+y . The formulaString defaults
to "value~1" if value is a part of the data set.
If not, the first column of the data set is used. |
predictionLocations |
either a Spatial * object with
prediction locations or an integer with the requested number
of prediction locations. If boundaries are supported,
the sampled prediction locations will be sampled within the
boundaries |
targetCRS |
the wanted projection for the interpolated map |
boundaries |
SpatialPolygonsDataFrame with the boundaries
of regions in the prediction region |
boundaryLines |
SpatialPointsDataFrame with the boundaries between
pairs of regions discretized as points.
Will be read from file if lineFile is
given or will be created from boundaries if not. |
intCRS |
a particular projection requested for the interpolation |
params |
parameters for the interpolation, given as exceptions to the
default parameters set in the function getIntamapParams |
boundFile |
Filename where boundaries can be found, e.g. a shapefile |
lineFile |
Filename where paired points on boundaries can be found |
class |
setting the class(es) of the object, see intamap-package |
outputWhat |
List defining the requested type of output. Parameters:
|
blockWhat |
List defining particular output for block predictions. These include:
|
... |
|
This function is a help function for creating an object (see
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.
An object with observations, prediction locations, parameters and possible
additional elements for automatic interpolation. The object will have class
equal to the value of argument class
, and methods in the
intamap-package
will dispatch on the
object according to this class.
Jon Olav Skoien
intamap-package
and getIntamapParams
library(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" )