Skip to contents

BicubicSpline: tensor-product natural bicubic spline. BarrierIdw: IDW with line barriers (visibility exclusion or detour path distance). StewartPotential: population potential. Identical to the Python arm morie.fn.interpx.

Usage

BicubicSpline(x, y, z, xout, yout)

BarrierIdw(coords, values, targets, barriers, power = 2, method = "visibility")

StewartPotential(coords, masses, beta = 1, self_distance = NULL)

Arguments

x, y

Grid coordinates (increasing).

z

Values, one row per y and one column per x.

xout, yout

Prediction coordinates.

coords

Data or unit coordinates (two-column).

values

Data values.

targets

Prediction locations (two-column).

barriers

List of segments, each a 2 by 2 matrix (rows are end points).

power

IDW power.

method

"visibility" or "path".

masses

Unit masses.

beta

Distance exponent.

self_distance

Distance used for the own mass (NULL excludes it).

Value

A numeric vector.

References

de Boor, C. (1962). Bicubic spline interpolation. Journal of Mathematics and Physics 41, 212-218.

Stewart, J. Q. (1947). Empirical mathematical rules concerning the distribution and equilibrium of population. Geographical Review 37, 461-485.

Examples

BicubicSpline(0:2, 0:1, rbind(c(0, 1, 4), c(1, 2, 5)), 1, 0.5)
#> [1] 1.5
StewartPotential(rbind(c(0, 0), c(3, 4)), c(100, 50))
#> [1] 10 20