Nearest-neighbour interpolation for LiDAR

This tool can be used to interpolate a regular grid raster from a point cloud LiDAR dataset using the nearest-neighbour interpolation method. Notice that this interpolation method is particularly suited to situations where the surface contains numerous discontinuities, such as off-terrain objects, and when the point density is high, such as is frequently the case with LiDAR data sets. The user inputs a LiDAR dataset in LAS file format (.las) and the name of the output raster grid to be created. Although most often this tool will be used to create a digital elevation model (DEM) from the elevation data associated with the LiDAR dataset, the user can also specify a number of other parameters to interpolate including the LiDAR point intensity, classification, and associated red, green, and blue values. Note that not all LiDAR datasets will include each of these parameters. Interpolation can be based on all of the points in the dataset, first return points, or last return points. The user must also specify the search radius and rotation value (if any).

Grid cells that have no points within the search radius assigned the NoData value in the output image. The output raster is of the float data type and continuous data scale.

If the LiDAR data you wish to interpolate is not contained in the LAS file format, but rather an ASCII text file, you may use one of the interpolation tools contained in the Raster Creation toolbox to interpolate the dataset.

See Also:

Scripting:

The following is an example of a Python script using this tool:

wd = pluginHost.getWorkingDirectory()
# You may have multiple input files but they must
# be separated by semicolons in the string.
inputs = wd + "input1.las" + ";" + wd + "input2.las" + ";" + wd + "input3.las"
suffix = "NN"
interpParameter = "z (elevation)"
ptReturn = "all points"
maxSearchDist = "5.0"
gridRes = "1.0"
maxScanAngle = "25.0"
# excluded points... neverClassified = "false"
unclassified = "false"
bareGround = "false"
lowVeg = "false"
mediumVeg = "false"
highVeg = "false"
buildings = "false"
lowPoints = "false"
keyPoints = "false"
water = "false"
args = [inputs, suffix, interpParameter, ptReturn, maxSearchDist, gridRes,
maxScanAngle, neverClassified, unclassified, bareGround, lowVeg, mediumVeg,
highVeg, buildings, lowPoints, keyPoints, water]
pluginHost.runPlugin("LiDAR_NN_interpolation", args, False)

This is a Groovy script also using this tool:

def wd = pluginHost.getWorkingDirectory()
// You may have multiple input files but they must
// be separated by semicolons in the string.
def inputs = wd + "input1.las" + ";" + wd + "input2.las" + ";" + wd + "input3.las"
def suffix = "NN"
def interpParameter = "intensity"
def ptReturn = "last return"
def maxSearchDist = "5.0"
def gridRes = "1.0"
def maxScanAngle = "15.0"
// excluded points... def neverClassified = "false"
def unclassified = "false"
def bareGround = "false"
def lowVeg = "false"
def mediumVeg = "false"
def highVeg = "false"
def buildings = "false"
def lowPoints = "false"
def keyPoints = "false"
def water = "false"
String[] args = [inputs, suffix, interpParameter, ptReturn, maxSearchDist, gridRes,
maxScanAngle, neverClassified, unclassified, bareGround, lowVeg, mediumVeg,
highVeg, buildings, lowPoints, keyPoints, water]
pluginHost.runPlugin("LiDAR_NN_interpolation", args, false)

Credits: