cdtInterp: CDT interpolation methods

Description Usage Arguments Value

View source: R/cdtInterpolation_functions.R

Description

This function interpolates stations data on a rectangular grid in the x-y plane. The radius of influence for the interpolation method varies for each grid point.

Usage

1
2
cdtInterp(locations, values, newdata, nmin = 4, nmax = 10,
  method = "idw", spheric = FALSE, vgm = NULL, p = 2)

Arguments

locations

A matrix containing the coordinates of the station data. The 1st column is the longitude and the 2nd coulmn the latitude.

values

A vector containing the values of the station. The length of values must be equal to the number of row of locations.

newdata

A matrix containing the coordinates of the grid to interpolate. The 1st column is the longitude and the 2nd coulmn the latitude.

nmin

The minimum number of stations to be used to interpolate a grid point.

nmax

The maximum number of stations to be used to interpolate a grid point.

method

Method to calculate weights for the interpolation. Should be "idw" (default), "shepard", "spheremap" or "kriging".

  • "idw": Inverse distance weighted

  • "shepard": Modified Shepard interpolation

  • "spheremap": Spheremap interpolation method

  • "kriging": Ordinary kriging

spheric

If FALSE (default), then a Cartesian distance will be computed. If set to TRUE, a spherical distance will be computed.

vgm

A gstat variogram model. Example: vgm(10.2, "Sph", 2.7, 1.1).

p

The power to use in weight calculation.

Value

A matrix containing the interpolated data. The 1st and 2nd columns are the same as newdata and the 3rd column contains the interpolated values.


rijaf-iri/CDTMergingF documentation built on May 4, 2020, 9:05 p.m.