Summary
Evaluates the statistics of LAS points that overlay the area defined by polygon features.
Usage
-
When a LAS dataset is specified as input, all the data points in the LAS files it references will be processed. A subset of lidar data can also be selected by its classification codes, classification flags, and return values by applying the desired LAS point filters through a LAS dataset layer. Filters can be defined through the layer properties dialog or the Make LAS Dataset Layer tool.
Consider using this tool to determine the characteristics of lidar points over regions of interest defined by polygon boundaries. Only elevation obtained from LAS points will be evaluated. Any Z-values contributed by surface constraint features referenced by the LAS dataset will be ignored.
This tool adds several fields to the attribute table of the input features. If the fields already exist, their values will be overwritten. The values in the updated fields will reflect the indicated statistics about LAS points that overlap the input feature:
- Z_MIN—The lowest Z-value.
- Z_MAX—The highest Z-value.
- Z_MEAN—The average Z-value.
- POINT_COUNT—The tally of LAS points that were evaluated.
- STD_DEV—The standard deviation of Z-values.
Syntax
LasPointStatsByArea_3d (in_las_dataset, in_features, out_property)
Parameter | Explanation | Data Type |
in_las_dataset | The LAS dataset to process. | LAS Dataset Layer |
in_features | The polygon that defines the area for which statistics will be reported. | Feature Layer |
out_property | The properties that will be calculated.
| String |
Code sample
LasPointStatsByArea example 1 (Python window)
The following sample demonstrates the use of this tool in the Python window.
import arcpy
from arcpy import env
env.workspace = 'C:/data'
arcpy.ddd.LasPointStatsByArea('city_lidar.lasd', 'study_area.shp',
['Z_MIN', 'Z_MAX'])
LasPointStatsByArea example 2 (stand-alone script)
The following sample demonstrates the use of this tool in a stand-alone Python script.
'''****************************************************************************
Name: Extract Building Footprints
Description: Extract footprint from lidar points classified as buildings,
regularize its geometry, and calculate the building height.
****************************************************************************'''
import arcpy
lasd = arcpy.GetParameterAsText(0)
footprint = arcpy.GetParameterAsText(1)
try:
lasd_layer = 'building points'
arcpy.management.MakeLasDatasetLayer(lasd, lasd_layer, class_code=6)
temp_raster = 'in_memory/bldg_raster'
arcpy.management.LasPointStatsAsRaster(lasd_layer, temp_raster,
'PREDOMINANT_CLASS', 'CELLSIZE', 2.5)
temp_footprint = 'in_memory/footprint'
arcpy.conversion.RasterToPolygon(temp_raster, temp_footprint)
arcpy.ddd.RegularizeBuildingFootprint(temp_footprint, footprint,
method='RIGHT_ANGLES')
arcpy.ddd.LasPointStatsByArea(lasd_layer, footprint, ['MIN_Z', 'MAX_Z'])
arcpy.management.AddField(footprint, 'Height', 'Double')
arcpy.management.CalculateField(footprint, 'Height',
"round('!Z_Max! - !Z_Min!', 2)",
'PYTHON_9.3')
except arcpy.ExecuteError:
print(arcpy.GetMessages())
Environments
Licensing information
- ArcGIS for Desktop Basic: Requires 3D Analyst
- ArcGIS for Desktop Standard: Requires 3D Analyst
- ArcGIS for Desktop Advanced: Requires 3D Analyst