conformProjections {intamap} | R Documentation |
Getting conformed projections
Description
Getting a conformed projection for a set of Spatial
* elements
necessary for interpolation in the intamap-package
.
Usage
conformProjections(object)
Arguments
object |
an object of the type described in |
Details
conformProjections
is a function that attempts to reproject all projected
elements in object
to one common projection.
The function is usually called with an intamap object as argument
from createIntamapObject
if the parameter confProj = TRUE
.
Thus it is a function that is usually not necessary to call separately.
The need for this function is because
several of the functions in a typical spatial interpolation work flow inside the
intamap-package
require that the elements have a common projection. In
addition, there are some functions which are not able to deal with
unprojected spatial objects, i.e. objects with coordinates given in lattitude and
longitude. conformProjections
will hence also attempt to reproject all
elements that
have coordinates in lattitude and longitude, even in the cases where they
all have the same projections.
If only one of observations or predictionLocations has a projection (or is longlat), the other one is assumed to be equal. A warning is issued in this case.
The common projection depends on the object that is passed to conformProjections.
First of all, if intCRS
(see below) is present as an element of the object, all elements
will be reprojected to this projection. If not, intCRS
will be set equal to
the first projection possible in the list below.
- intCRS
Can be given as a component in
object
- and is the user-defined common projection used for interpolation- targetCRS
Can be given as a component in
object
- and is the user-defined target projections- predCRS
The projection of the predictionLocations in
object
- obsCRS
The projection of the observations
Value
A list of the parameters to be included in the object
described in intamap-package
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.
Examples
data(meuse)
coordinates(meuse) = ~x+y
proj4string(meuse) <- CRS("+proj=stere +lat_0=52.15616055555555
+lon_0=5.38763888888889 +k=0.999908 +x_0=155000 +y_0=463000 +ellps=bessel +units=m")
predictionLocations = spsample(meuse, 50, "regular")
krigingObject = createIntamapObject(
observations = meuse,
predictionLocations = predictionLocations,
formulaString = as.formula("log(zinc)~1"),
intCRS = "+init=epsg:3035"
)
krigingObject = conformProjections(krigingObject)
proj4string(meuse)
proj4string(krigingObject$observations)