createIntamapObject {intamap} | R Documentation |
Create an object for interpolation within the intamap package
Description
This is a help function for creating an object (see intamap-package
to be used for interpolation within the intamap-package
Usage
createIntamapObject(observations, obsChar, formulaString,
predictionLocations=100, targetCRS, boundaries, boundaryLines,
intCRS, params=list(), boundFile, lineFile, class="idw",
outputWhat, blockWhat = "none",...)
Arguments
observations |
a
|
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 |
predictionLocations |
either a |
targetCRS |
the wanted projection for the interpolated map |
boundaries |
|
boundaryLines |
|
intCRS |
a particular projection requested for the interpolation |
params |
parameters for the interpolation, given as exceptions to the
default parameters set in the function |
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 |
outputWhat |
List defining the requested type of output. Parameters:
The list defaults to list (mean = TRUE) for objects of class IDW and list(mean=TRUE, variance = TRUE) for all other objects. |
blockWhat |
List defining particular output for block predictions. These include:
|
... |
|
Details
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.
Value
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.
Author(s)
Jon Olav Skoien
References
Pebesma, E., Cornford, D., Dubois, G., Heuvelink, G.B.M., Hristopulos, D., Pilz, J., Stohlker, U., Morin, G., Skoien, J.O. INTAMAP: The design and implementation f an interoperable automated interpolation Web Service. Computers and Geosciences 37 (3), 2011.
See Also
intamap-package
and getIntamapParams
Examples
# 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"
)