Summary
Creates a LAS dataset layer that can apply filters to LAS points and control the enforcement of surface constraint features.
Usage
A LAS dataset layer can be used as a staging ground for subsequent analysis. For example, a digital elevation model (DEM) can be easily created from lidar by filtering for class code 2, which represents ground measurements then passing the resulting layer into the LAS Dataset To Raster tool.
-
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)
Syntax
MakeLasDatasetLayer_management (in_las_dataset, out_layer, {class_code}, {return_values}, {no_flag}, {synthetic}, {keypoint}, {withheld}, {surface_constraints}, {overlap})
Parameter | Explanation | Data Type |
in_las_dataset | The LAS dataset to process. | LAS Dataset Layer |
out_layer | The name of the resulting LAS dataset layer. Any backslash or forward slash can be used to denote a group layer. | Las Dataset Layer |
class_code [class_code,...] (Optional) |
Allows the filtering of LAS points by classification codes. The range of valid values will depend on the class codes supported by the version of LAS files referenced by the LAS dataset. All class codes will be selected by default.
| Long |
return_values [return_values,...] (Optional) | Specifies the return values to be used for filtering LAS points. When nothing is specified, all returns are used.
| String |
no_flag (Optional) | Indicates whether data points that do not have any classification flags assigned should be enabled for display and analysis.
| Boolean |
synthetic (Optional) | Indicates whether data points flagged as synthetic, or points that originated from a data source other than lidar, should be enabled for display and analysis..
| Boolean |
keypoint (Optional) | Indicates whether data points flagged as model key points, or significant measurements that should not be thinned away, should be enabled for display and analysis..
| Boolean |
withheld (Optional) | Indicates whether data points flagged as withheld, which typically represent unwanted noise measurements, should be enabled for display and analysis.
| Boolean |
surface_constraints [surface_constraints,...] (Optional) | The name of the surface constraint features that will be enabled in the layer. All constraints are enabled by default. | String |
overlap (Optional) | Indicates whether data points flagged as overlap should be enabled for display and analysis.
| Boolean |
Code sample
MakeLasDatasetLayer example 1 (Python window)
The following sample demonstrates the use of this tool in the Python window.
import arcpy
from arcpy import env
arcpy.CheckOutExtension('3D')
env.workspace = 'C:/data'
arcpy.MakeLasDatasetLayer_management('Baltimore.lasd', 'Baltimore Layer',
2, 'LAST', 'INCLUDE_UNFLAGGED',
'EXCLUDE_SYNTHETIC', 'INCLUDE_KEYPOINT',
'EXCLUDE_WITHHELD')
MakeLasDatasetLayer example 2 (stand-alone script)
The following sample demonstrates the use of this tool in a stand-alone Python script.
'''*********************************************************************
Name: Export Elevation Raster from Ground LAS Measurements
Description: This script demonstrates how to export
ground measurements from LAS files to a raster using a
LAS dataset. This sample is designed to be used as a script
tool.
*********************************************************************'''
# Import system modules
import arcpy
try:
# Set Local Variables
inLas = arcpy.GetParameterAsText(0)
recursion = arcpy.GetParameterAsText(1)
surfCons = arcpy.GetParameterAsText(2)
classCode = arcpy.GetParameterAsText(3)
returnValue = arcpy.GetParameterAsText(4)
spatialRef = arcpy.GetParameterAsText(5)
lasD = arcpy.GetParameterAsText(6)
outRaster = arcpy.GetParameterAsText(7)
cellSize = arcpy.GetParameter(8)
zFactor = arcpy.GetParameter(9)
if arcpy.ProductInfo == 'ArcView':
arcpy.CheckOutExtension('3D')
# Execute CreateLasDataset
arcpy.management.CreateLasDataset(inLas, lasD, recursion, surfCons, sr)
# Execute MakeLasDatasetLayer
lasLyr = arcpy.CreateUniqueName('Baltimore')
arcpy.management.MakeLasDatasetLayer(lasD, lasLyr, classCode, returnValue)
# Execute LasDatasetToRaster
arcpy.conversion.LasDatasetToRaster(lasLyr, outRaster, 'ELEVATION',
'TRIANGULATION LINEAR WINDOW_SIZE 10', 'FLOAT',
'CELLSIZE', cellSize, zFactor)
arcpy.GetMessages()
except arcpy.ExecuteError:
print(arcpy.GetMessages())
except Exception as err:
print(err.args[0])
finally:
arcpy.management.Delete(lasLyr)
Environments
Licensing information
- ArcGIS for Desktop Basic: Yes
- ArcGIS for Desktop Standard: Yes
- ArcGIS for Desktop Advanced: Yes