Label | Explanation | Data Type |
Input LAS Dataset | The LAS dataset that will be processed. | LAS Dataset Layer |
Output Raster | The location and name of the output raster. When storing a raster dataset in a geodatabase or in a folder such as an Esri Grid, do not add a file extension to the name of the raster dataset. A file extension can be provided to define the raster's format when storing it in a folder, such as .tif to generate a GeoTIFF or .img to generate an ERDAS IMAGINE format file. If the raster is stored as a .tif file or in a geodatabase, the raster compression type and quality can be specified using geoprocessing environment settings. | Raster Dataset |
Method
(Optional) | Specifies the type of statistics that will be collected about the LAS points in each cell of the output raster.
| String |
Sampling Type
(Optional) | Specifies how the Sampling Value parameter will be interpreted to define the output raster's cell size.
| String |
Sampling Value
(Optional) | The value used in conjunction with the Sampling Type parameter to define the output raster's cell size. | Double |
Summary
Creates a raster whose cell values reflect statistical information about LAS points.
Usage
-
You can filter the points that are processed by this tool using any combination of classification codes, classification flags, and return values through the LAS dataset layer's point filters. The filters can be defined on the Layer Properties dialog box or using the Make LAS Dataset Layer tool. LAS point filters will reflect in the results obtained for all statistical outputs except the Pulse Count method, which evaluates all last return points.
The Point Count option of the Method parameter evaluates the point density of the LAS dataset. This information is helpful when detecting irregular hot spots of high density points, because this type of data can produce degraded performance when processing the LAS files using other tools. If high density hot spots are encountered, the Thin LAS tool can be used to produce a new point cloud with more consistent spatial distribution.
The Most Frequent Class Code option of the Method parameter can be used to identify the number of unique objects defined by a specific class code, particularly if those objects are spatially separated in the horizontal direction. To do this, first apply a point filter to isolate the specific class code. Then create the statistics raster using a cell size that is large enough to ensure that the connectivity of cells representing points belong to the same object and that gaps between points from different objects are preserved. For example, to determine the cell size appropriate for connecting points belonging to a street light, consider the overall spacing of the points and the distance between nearby street lights. The resulting raster can be used to assess the footprint of each object. The number of unique objects can be obtained by either converting the raster to a polygon feature using the Raster To Polygon tool or assigning a unique value to each cluster of cells using the Region Group tool.
Parameters
arcpy.management.LasPointStatsAsRaster(in_las_dataset, out_raster, {method}, {sampling_type}, {sampling_value})
Name | Explanation | Data Type |
in_las_dataset | The LAS dataset that will be processed. | LAS Dataset Layer |
out_raster | The location and name of the output raster. When storing a raster dataset in a geodatabase or in a folder such as an Esri Grid, do not add a file extension to the name of the raster dataset. A file extension can be provided to define the raster's format when storing it in a folder, such as .tif to generate a GeoTIFF or .img to generate an ERDAS IMAGINE format file. If the raster is stored as a .tif file or in a geodatabase, the raster compression type and quality can be specified using geoprocessing environment settings. | Raster Dataset |
method (Optional) | Specifies the type of statistics that will be collected about the LAS points in each cell of the output raster.
| String |
sampling_type (Optional) | Specifies how the Sampling Value parameter will be interpreted to define the output raster's cell size.
| String |
sampling_value (Optional) | The value used in conjunction with the Sampling Type parameter to define the output raster's cell size. | Double |
Code sample
The following sample demonstrates the use of this tool in the Python window:
import arcpy
from arcpy import env
env.workspace = "C:/data"
arcpy.LasPointStatsAsRaster_3d("test.lasd", "lidar_intensity.img",
"INTENSITY_RANGE", "CELLSIZE", 15)
The following sample demonstrates the use of this tool in a stand-alone Python script:
'''**********************************************************************
Name: LAS Point Statistics As Raster
Description: Identifies the most frequently occurring return value for
each pulse in a given set of LAS files.
Designed for use as a script tool.
**********************************************************************'''
# Import system modules
import arcpy
# Set Local Variables
lasD = arcpy.GetParameterAsText(0)
inLas = arcpy.GetParameterAsText(1) #input las files
sr = arcpy.GetParameter(2) #spatial reference of las dataset
statsRaster = arcpy.GetParameterAsText(3)
# Execute CreateLasDataset
arcpy.management.CreateLasDataset(inLas, lasD, 'RECURSION', '', sr)
# Execute LasPointStatsAsRaster
arcpy.management.LasPointStatsAsRaster(lasD, statsRaster,
"PREDOMINANT_RETURNS_PER_PULSE",
"CELLSIZE", 15)