Add Files To LAS Dataset (Data Management)

Available with Standard or Advanced license.

Available with 3D Analyst license.

Available with Spatial Analyst license.

Summary

Adds references for one or more LAS files and surface constraint features to a LAS dataset.

Usage

  • The LAS dataset is designed for use with lidar data in the .las or .zlas formats. LAS file versions 1.0–1.4 are supported. Esri's EzLAS Optimizer is a stand-alone lidar utility that can be used to generate .zlas files or convert them back to the .las format.

  • Surface constraint features can be used to enforce feature-derived elevation values that represent surface characteristics in the LAS dataset.

  • 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)

    Note:

    While the bulk of new class code assignments introduced with LAS 1.4 were previously designated as Reserved, class codes 8 and 12 were changed from Model Key and Overlap to Reserved.

Syntax

arcpy.management.AddFilesToLasDataset(in_las_dataset, {in_files}, {folder_recursion}, {in_surface_constraints})
ParameterExplanationData Type
in_las_dataset

The LAS dataset to process.

LAS Dataset Layer
in_files
[in_files,...]
(Optional)

Input files can reference any combination of individual LAS files and folders containing LAS data.

In the tool dialog window, a folder can also be specified as an input by selecting the desired folder in Windows Explorer and dragging it into the parameter's input box.

Folder; File
folder_recursion
(Optional)

Specifies whether lidar data residing in the subdirectories of an input folder will be added to the LAS dataset.

  • NO_RECURSIONOnly lidar files found in an input folder will be added to the LAS dataset. This is the default.
  • RECURSIONAll LAS files residing in the subdirectories of an input folder will be added to the LAS dataset.
Boolean
in_surface_constraints
[[in_feature_class, height_field, SF_type],...]
(Optional)

The features that will be referenced by the LAS dataset when generating a triangulated surface. Each feature will need the following properties defined:

in_feature_class—The feature to be referenced by the LAS dataset.

height_field—Any numeric field in the feature's attribute table can be used to define the height source. If the feature's geometry contains z-values, it can be selected by specifying Shape.Z. If no height is desired, specify the keyword <None> to create Z-less features whose elevation would be interpolated from the surface.

SF_type—The surface feature type that defines how the feature geometry gets incorporated into the triangulation for the surface. Options with hard or soft designation refer to whether the feature edges represent distinct breaks in slope or a gradual change.

  • anchorpoints—Elevation points that never get thinned away. This option is only available for single-point feature geometry.
  • hardline or softline—Breaklines that enforce a height value.
  • hardclip or softclip—Polygon dataset that defines the boundary of the LAS dataset.
  • harderase or softerase—Polygon dataset that defines holes in the LAS dataset.
  • hardreplace or softreplace—Polygon dataset that defines areas of constant height.
Value Table

Derived Output

NameExplanationData Type
derived_las_dataset

The updated LAS dataset.

LAS Dataset Layer

Code sample

AddFilesToLasDataset 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.AddFilesToLasDataset_management("test.lasd", 
                                      ["LA_N", "LA_S/LA_5S4E.las"],
                                      "RECURSION", 
                                      ["boundary.shp <None> Soft_Clip",
                                       "breakline.shp Shape.Z Hard_Line"])
AddFilesToLasDataset example 2 (stand-alone script)

The following sample demonstrates the use of this tool in a stand-alone Python script.

'''*********************************************************************
Name: Modify Files in LAS Dataset& Calculate Stats for LASD
Description: Adds files & surface constraints to a LAS dataset, then
             calculates statistics and generates report.
*********************************************************************'''
# Import system modules
import arcpy

try:
    # Script variables
    arcpy.env.workspace = 'C:/data'
    lasd = 'sample.lasd'
    oldLas = ['2006', '2007/file2.las']
    newLas = ['2007_updates_1', '2007_updates_2']
    oldSurfaceConstraints = ['boundary.shp', 'streams.shp']
    newSurfaceConstraints = [['sample.gdb/boundary', '<None>',
                              'Soft_Clip']
                             ['sample.gdb/streams', 'Shape.Z',
                              'Hard_Line']]
    arcpy.management.RemoveFilesFromLasDataset(lasd, oldLas,
                                               oldSurfaceConstraints)
    arcpy.management.AddFilesToLasDataset(lasd, newLas, 'RECURSION',
                                          newSurfaceConstraints)
    arcpy.management.LasDatasetStatistics(lasd, "UPDATED_FILES",
                                          "lasd_stats.txt",
                                          "LAS_FILE", "DECIMAL_POINT",
                                          "SPACE", "LAS_summary.txt")
except arcpy.ExecuteError:
    print(arcpy.GetMessages())
except Exception as err:
    print(err.args[0])

Licensing information

  • Basic: Requires 3D Analyst or Spatial Analyst
  • Standard: Yes
  • Advanced: Yes

Related topics