This tool can be used to interpolate a regular grid raster from an XYZ points dataset where each grid cell contains the point density within a user-specified radius. The user specifies the name of the input points file and the name of the output raster grid to be created. The input points file can either be a binary file containing X-coordinate, Y-coordinate, and Z-value triplets (in 64-bit double-precision floating-point format with an .xyz file extension) or an ASCII text file. If an ASCII text file is input, the user may specify which columns correspond to the X- and Y-coordinates and Z-values, i.e. it may be a table containing numerous columns. There is no need to specify the corresponding columns if a binary .xyz file is used because the format is assumed to contain XYZ triplets in regular sequence. Notice that if an ASCII text file is input, the program will automatically create and store a new binary .xyz points file, which can be used at a later date. Reading binary data from storage is many times faster for binary data than ASCII data, which is why the binary file is created and stored. The user must ensure that there is sufficient storage on the disc for the new binary file.
The user must also specify the search radius and the grid resolution of the output raster. The output raster is of the float data type and continuous data scale.
Notice that LiDAR datasets contained within LAS files (.las file extension) can be interpolated using the complementary LiDAR Point Density tool, which provides a richer set of interpolation options including the ability to intperolate first or last returns only.
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.
inputFiles = wd + "input1.txt" + ";" + wd + "input2.txt" + ";" + wd + "input3.txt"
fistLineHeader = "false"
output = wd + "output.dep"
gridRes = "10.0"
args = [inputFiles, fistLineHeader, output, gridRes]
pluginHost.runPlugin("PointDensity", 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 inputFiles = wd + "input1.txt" + ";" + wd + "input2.txt" + ";" + wd + "input3.txt"
def fistLineHeader = "false"
def output = wd + "output.dep"
def gridRes = "10.0"
String args = [inputFiles, fistLineHeader, output, gridRes]
pluginHost.runPlugin("PointDensity", args, false)