lidR (version 1.0.2)

lasterrain: Get the elevation of the ground for given coordinates

Description

Interpolate ground points and return the elevation at the position of interest given by the user. The interpolation can be done using 3 methods: "knnidw", "akima" or "kriging" (see details). The algorithm uses the points classified as "ground" to compute the interpolation.

Usage

lasterrain(.las, coord, method, k = 6L, linear = TRUE,
  model = gstat::vgm(0.59, "Sph", 874))

Arguments

.las

LAS objet

coord

data.frame containing the coordinates of interest in columns X and Y

method

character can be "knnidw", "akima" or "kriging" (see details)

k

numeric. number of k nearest neibourgh when selected method is "knnidw"

linear

logical indicating wether linear or spline interpolation should be used when selected method is "akima"

model

a variogram model computed with vgm when selected method is "kriging"

Value

Numeric. The predicted elevations.

Details

knnidw

Interpolation is done using a k-nearest neighbour (KNN) approach with an inverse distance weighting (IDW). This is a very fast but also basic method for spatial data interpolation.

akima

Interpolation depends on the interp function from package akima. This method is relatively fast and more advanced than knnidw and provides good digital terrain models. Notice that with this method no extrapolation is done outside of the convex hull determined by the ground points.

kriging

Interpolation is done by universal kriging using krige function. This method is very slow and very difficult to manipulate but it is also the most regognized method to interpolate spatial data.

See Also

grid_terrain lasnormalize vgm krige interp