Skip To Content

Set LAS Class Codes Using Features

Summary

Classifies LAS points that intersect the input features.

Usage

  • Points, lines, and polygons are valid inputs. The buffer distance is particularly important for points and lines, since it is less likely that a given LAS point would fall exactly on the line or have the same coordinate as the input point.

  • Consider using this tool if you have polygons that delineate water bodies and want to assign all LAS points that fall within this polygon with the classification code value of 9, which represents water.

  • 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

SetLasClassCodesUsingFeatures_3d (in_las_dataset, feature_class, {compute_stats})
ParameterExplanationData Type
in_las_dataset

The LAS dataset to process.

LAS Dataset Layer
feature_class
[[features, buffer_distance, new_class, synthetic, key_point, withheld, overlap],...]

Enter each feature and its associated options that will be used to define the classification operation as a list of lists (e.g. [['feature1', 6, 9, 'NO CHANGE', 'SET', 'CLEAR', 'NO CHANGE'], ['feature 2', 0, 6, 'NO CHANGE', 'NO CHANGE', 'NO CHANGE', 'NO CHANGE']]. Each feature has the following options:

  • features—The features used for reclassifying LAS points.
  • buffer_distance—The buffer distance applied to the input features prior to determining the LAS points that intersect its area.
  • new_class—The class code to be assigned.
  • synthetic—The Synthetic classification flag is used to identify points that were not obtained from a lidar sensor.
  • key_point—The Model Key Point classification flag represents a subset of points that can be used to capture a desired level of detail of a given class code.
  • withheld—The Withheld classification flag signifies erroneous data that should be excluded from analysis and visualization.
  • overlap—The Overlap designation identifies points from overlapping scans and is only supported in LAS 1.4 files.
Value Table
compute_stats
(Optional)

Specifies whether statistics should be computed for the LAS files referenced by the LAS dataset. The presence of statistics allows the LAS dataset layer's filtering and symbology options to only show LAS attribute values that exist in the LAS files.

  • COMPUTE_STATSStatistics will be computed.
  • NO_COMPUTE_STATSStatistics will not be computed. This is the default.
Boolean

Code sample

SetLasClassCodesUsingFeatures example 1 (Python window)

The following sample demonstrates the use of this tool in the Python window.

arcpy.env.workspace = 'C:/data'
arcpy.SetLasClassCodesUsingFeatures_3d("test.lasd", ["lake.shp", 0, 9],
                                       compute_stats="COMPUTE_STATS")
SetLasClassCodesUsingFeatures example 2 (stand-alone script)

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

'''**********************************************************************
Name: Assign Withheld Classification Flag to Outlier Points in LAS Files
Description: Uses Locate Outliers to identify points in LAS files that
             should be assigned the 'withheld' classification flag.
             Designed for use as a script tool.
**********************************************************************'''
# Import system modules
import arcpy

# Set Local Variables
lasD = arcpy.GetParameterAsText(0)
outliers = 'in_memory/outliers'

# Execute LocateOutliers
arcpy.ddd.LocateOutliers(lasD, outliers, 'APPLY_HARD_LIMIT', -10,
                         350, 'APPLY_COMPARISON_FILTER', 1.2, 120,
                         0.8, 8000)

# Execute SetLasClassCodeUsingFeatures
arcpy.ddd.SetLasClassCodesUsingFeatures(lasd, [["outliers.shp", 5,
                                                "NO_CHANGE", "NO_CHANGE",
                                                "NO_CHANGE", "SET"]])

Licensing information

  • ArcGIS Desktop Basic: Requires 3D Analyst
  • ArcGIS Desktop Standard: Requires 3D Analyst
  • ArcGIS Desktop Advanced: Requires 3D Analyst

Related topics