result.extract.interpolate: Result interpotion

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/result.extract.interpolate.R

Description

Interpolates result values with given spatial information.

Usage

1
result.extract.interpolate(mask.grid, values, alt, x, y)

Arguments

mask.grid

The grid with spatial information the values are ordered by.

values

The values which should be interpolated.

alt

The related altitude for the gridcells of ‘mask.grid’.

x

The related Rechtswert (Gauss-Krueger-coordinates) for the gridcells of ‘mask.grid’.

y

The related Hochwert (Gauss-Krueger-coordinates) for the gridcells of ‘mask.grid’.

Details

Interpolates result values with given spatial information by external drift kriging.

Value

A vector with the interpolated values.

Author(s)

Daniel Doktor, Maximilian Lange

References

Krige, D.G., 1951. A statistical approach to some basic mine valuation problems on the witwatersrand. Journal of the Chemical, Metallurgical and Mining Society of South Africa 52, 119-139. Pebesma, E.J., 2004. Multivariable geostatistics in S: the gstat package. Computers & Geosciences 30, 683-691.

See Also

result.extract.main,data.main

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
  ## load preprocessed data
  data(dataFinal)
  ## load spatial information
  data(relatedGrid)

  ## set or load params
  params <- c(0, 0.058326, 0.109494, 0.039178, 
			-10.34, -0.89, 18.11,-10.03, 
			28.61, 44.49)

  ## apply model
  result <- pim.solve(params, dataFinal, model.no=11, 
			silent=FALSE, out2File=FALSE)
 
  ## resolve outlier information
  outliers <- result$outlier.bb + result$outlier.lc
  outliers.na <- which(is.na(outliers)==TRUE)
  outliers[outliers.na] <- rep(0, length(outliers.na))

  mask.grid <- relatedGrid

  ## extract valid modelled values
  values.model <- result.extract.sub(mask.grid=mask.grid, 
				result$doy.bb.pim, result$gk4.x, 
				result$gk4.y, outliers=outliers, 
				silent=FALSE, withOutliers=FALSE)$values

  ## interpolate result values with spatial informations of mask.grid
  values.model <- result.extract.interpolate(mask.grid=mask.grid, 
				values=values.model, alt=mask.grid$alt, 
				x=mask.grid$x, y=mask.grid$y)

phenmod documentation built on May 29, 2017, 11:37 a.m.