Summary
Creates a raster whose cell values reflect statistical information about measurements from LAS files referenced by a LAS dataset.
Usage
-
The LAS dataset layer can also be used to control the enforcement of surface constraint features that may be referenced by the LAS dataset. The constraints are enforced when displaying or processing the LAS dataset as a triangulated surface.
-
The LAS format supports the classification of each point based on the specifications defined by the American Society for Photogrammetry and Remote Sensing (ASPRS). The ArcGIS platform applies the classification scheme specified for LAS file version 1.4:
Classification Value Classification Type 0
Never Classified
1
Unassigned
2
Ground
3
Low Vegetation
4
Medium Vegetation
5
High Vegetation
6
Building
7
Low Noise
8
Model Key / Reserved
9
Water
10
Rail
11
Road Surface
12
Overlap / Reserved
13
Wire – Guard
14
Wire – Conductor
15
Transmission Tower
16
Wire – Connector
17
Bridge Deck
18
High Noise
19 – 63
Reserved for ASPRS Definition (LAS 1.1 to 1.3 support up to class code 31)
32 – 255
User Definable (Only supported in LAS 1.0 and certain versions of 1.4)
Consider using PREDOMINANT_LAST_RETURN for the Method parameter to identify locations with higher return values that could indicate the presence of vegetation.
Consider using Z_RANGE for the Method parameter to determine locations with potential outliers.
Syntax
arcpy.management.LasPointStatsAsRaster(in_las_dataset, out_raster, {method}, {sampling_type}, {sampling_value})
Parameter | Explanation | Data Type |
in_las_dataset | The LAS dataset to process. | 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, no file extension should be added 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 TIFF file or in a geodatabase, its raster compression type and quality can be specified using geoprocessing environment settings. | Raster Dataset |
method (Optional) | The type of statistics collected about the LAS points in each cell of the output raster.
| String |
sampling_type (Optional) | Specifies the method used for interpreting the Sampling Value to define the resolution of the output raster.
| String |
sampling_value (Optional) | Specifies the value used in conjunction with the Sampling Type to define the resolution of the output raster. | Double |
Code sample
LasPointStatsAsRaster 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.LasPointStatsAsRaster_3d("test.lasd", "lidar_intensity.img",
"INTENSITY_RANGE", "CELLSIZE", 15)
LasPointStatsAsRaster example 2 (stand-alone script)
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)
try:
arcpy.CheckOutExtension('3D')
# Execute CreateLasDataset
arcpy.management.CreateLasDataset(inLas, lasD, 'RECURSION', '', sr)
# Execute LasPointStatsAsRaster
arcpy.management.LasPointStatsAsRaster(lasD, statsRaster,
"PREDOMINANT_RETURNS_PER_PULSE",
"CELLSIZE", 15)
arcpy.CheckInExtension('3D')
except arcpy.ExecuteError:
print(arcpy.GetMessages())
except Exception as err:
print(err.args[0])
Environments
Licensing information
- Basic: Requires 3D Analyst or Spatial Analyst
- Standard: Yes
- Advanced: Yes