PDAL - Point Data Abstraction Library
- Specify input filepath
- Use filters.divider with the following options:
mode
- "partition" (default) or "round_robin" processingcount
- Provide number of output files to create from single inputcapacity
- Alternatively, provide the number of points to be contained in each output file
- Use writers.las to write out new las files
filename
- include "#" character in output filename for incremental numbering of split files
{
"pipeline":[
"\input\filepath\filename.las",
{
"tag" : "splitLasFile",
"type" : "filters.divider",
"mode" : "partition",
"count" : "10"
},
{
"tag" : "writeOutLasSplits",
"type":"writers.las",
"filename":"\output\filepath\filename_split_#.las"
}
]
}
- filters.range simple filter for specified dimension(s):
limits
- dimension name and range to include- e.g. filter to values of R where x <= R <= y --> "R[x:y]
- e.g. filter to values of R where R is NOT a < R <= b --> "R!(a:b]"
...
{
"tag" : "filterReturns",
"type" : "filters.range",
"limits" : "ReturnNumber[1:1]"
},
...
- writers.gdal GDAL raster writer:
resolution
- length of raster pixel edges (in same units as x,y from las file)radius
- radius from pixel center to calculate pixel value (default radius = resolution * sqrt(2))dimension
- value of pixel to output taken from points within the pixel (min, max, mean, idw, count, or stdev)gdaldriver
- "GTiff" for GeoTiff (default)filename
- output filename for raster- see online documentation for further optional parameters
...
{
"tag" : "pointDensityRaster",
"type" : "writers.gdal",
"resolution": 10,
"output_type" : "count",
"gdaldriver" : "GTiff",
"filename" : "pointDensityRater_10m.tif"
}
...
- Within a pipeline JSON file, outputs from one step can be used as inputs for following steps by use of the "inputs" option:
tag
- provide a tag name for previous steps to reference in later input arraysinputs
specifies an array of tags from previous steps to use as inputs for the current step
...
{
...
"tag" : "firstStep",
...
},
{
...
"tag" : "secondStep",
...
},
{
...
"tag" : "lastStep"
"inputs" : [
"firstStep",
"secondStep"
],
...
}
...
- From a terminal, call up the pipeline json file that is to be executed
- (Optionally include variables as arguments)
pdal pipeline filename.json
pdal translate "input_file.las" -o "output_file.las" smrf range --filters.range.limits="Classification[2:2]" -v 4
pdal translate "input_file.las" -o "output_file.las" smrf range --filters.range.limits="Classification![2:2]" -v 4
{
"pipeline": [
"input_filename.las",
{
"type" : "writers.gdal",
"gdaldriver" : "Gtiff",
"resolution": 5,
"filename":"output_filename.tif"
}
]
}
lasdiff -i "input_ground_surface.las" -i "input_nonground_surface.las" -o "output_diff.las"