Change LAS Class Codes (3D Analyst)

Summary

Reassigns the classification codes and flags of .las and .zlas files.

Usage

  • The American Society for Photogrammetry and Remote Sensing (ASPRS) defines how class codes should be used for LAS files. The ASPRS classification standard allows LAS files to be easily processed and interpreted between different applications. The ASPRS guidelines divide class codes into reserved classes and user-definable classes. Reserved classes are values whose meanings are or will be defined by the ASPRS. User-definable classes can be used to classify objects that are not already described by the reserved classes. While many reserved classes are already defined, such as class 2 for ground and class 6 for buildings, the undefined reserved classes will be used in the future as the LAS specification evolves. For this reason, use reserved classes only for the objects they are meant to describe, and assign custom class codes to a user-definable class code. Consider using this tool to remap the class code of any custom objects that use reserved classes to a user-definable class.

  • This tool does not honor layer filters. All points with the class codes specified in the Current Class column will be modified. The classification change can be limited to an edit of the class code or a particular class flag, or any combination of class codes and class flags, such as reassigning ground model key points that are assigned a value of 8 to class 2 with the model key class flag. Also, a value of -1 can be specified in the Current Class column to make a uniform change to all points irrespective of their class code. This can be useful if you need to reset the existing classification to evaluate different classification settings, or to make other uniform edits to classification flags. For example, the synthetic classification flag is meant to represent any point that was acquired from a source other than lidar. If the point cloud is derived from a photogrammetric process and you want to assign the synthetic flag to each point, specify a value of -1 in the Current Class column and specify the Synthetic column to Set.

  • The classification codes and flags that can be used vary on the LAS file version and point record format. Consider the limitations of the input .las and .zlas files for any potential change. To maximize the options for classifying a point cloud, you can convert older files to the LAS 1.4 format using the Convert LAS tool. If the files also need to be tiled or thinned to improve performance, you can use the Tile LAS and Thin LAS tools to convert the file version.

    LAS file versionClass code rangeClassification flags

    1.0

    0 - 255

    None

    1.1

    0 - 31

    Synthetic, Key-point, Withheld

    1.2

    0 - 31

    Synthetic, Key-point, Withheld

    1.3

    0 - 31

    Synthetic, Key-point, Withheld

    1.4

    0 - 255

    Synthetic, Key-point, Withheld, Overlap

    Classification flags like key-point and overlap supersede the use of classification codes which defined those same concepts. This allows the points to have a classification code that describes the object they are representing while also retaining the functional value of being defined as a model key point or an overlap point. If your LAS file version supports these classification flags, considering modifying the points accordingly. Historically, when model key points were defined by class code 8, the points represented a subset of ground-classified points. Such points can now be modified to have the class code set to 2 with the Model Key classification flag.

  • ArcGIS applies the classification scheme specified in the LAS file version 1.4 as follows:

    Classification value Meaning

    0

    Created, Never classified

    1

    Unassigned

    2

    Ground

    3

    Low Vegetation

    4

    Medium Vegetation

    5

    High Vegetation

    6

    Building

    7

    Low Point

    8

    Model Key-Point

    9

    Water

    10

    Rail

    11

    Road Surface

    12

    Reserved

    13

    Wire - Guard (Shield)

    14

    Wire - Conductor (Phase)

    15

    Transmission Tower

    16

    Wire-Structure Connector (Insulator)

    17

    Bridge Deck

    18

    High Noise

    19

    Reserved

    20

    Ignored Ground

    21

    Snow

    22

    Temporal Exclusion

    23–63

    Reserved

    64–255

    User Definable

    Note:
    • The most current LAS 1.4 classification system has these codes (code 8: Model Key/Reserved and code 12: Overlap/Reserved) reserved, and points with these characteristics should use the corresponding class flags instead.
    • LAS 1.1–1.3 only support classes 0–31.

Parameters

LabelExplanationData Type
Input LAS Dataset

The LAS dataset that will be processed.

LAS Dataset Layer
Class Codes

The class codes that will be modified and the change that will be made to their classification code and classification flags. A value of -1 can be provided in the Current Class column to modify all class codes.

Value Table
Compute statistics
(Optional)

Specifies whether statistics will be computed for the .las files referenced by the LAS dataset. Computing statistics provides a spatial index for each .las file, which improves analysis and display performance. Statistics also enhance the filtering and symbology experience by limiting the display of LAS attributes, such as classification codes and return information, to values that are present in the .las file.

  • Checked—Statistics will be computed. This is the default.
  • Unchecked—Statistics will not be computed.
Boolean
Processing Extent
(Optional)

The extent of the data that will be evaluated.

  • Current Display Extent Map View—The extent will be based on the active map or scene.
  • Draw Extent Square and Finish—The extent will be based on a rectangle drawn on the map or scene.
  • Extent of a Layer Layer—The extent will be based on an active map layer. Choose an available layer or use the Extent of data in all layers option. Each map layer has the following options:

    • All Features Select All—The extent of all features.
    • Selected Features Area from Selected Features—The extent of the selected features.
    • Visible Features Extent Indicator—The extent of visible features.

  • Browse Browse—The extent will be based on a dataset.
  • Intersection of Inputs Intersect—The extent will be the intersecting extent of all inputs.
  • Union of Inputs Union—The extent will be the combined extent of all inputs.
  • Clipboard Paste—The extent can be copied to and from the clipboard.
    • Copy Extent Copy—Copies the extent and coordinate system to the clipboard.
    • Paste Extent Paste—Pastes the extent and coordinate system from the clipboard. If the clipboard does not include a coordinate system, the extent will use the map’s coordinate system.
  • Reset Extent Reset—The extent will be reset to the default value.

When coordinates are manually provided, the coordinates must be numeric values and in the active map's coordinate system. The map may use different display units than the provided coordinates. Use a negative value sign for south and west coordinates.

Extent
Processing Boundary

The polygon feature or features that will define the area to be processed.

Feature Layer
Process entire LAS files that intersect extent
(Optional)

Specifies how the area of interest will be used in determining how .las files will be processed. The area of interest is defined by the Processing Extent parameter value, the Processing Boundary parameter value, or a combination of both.

  • Unchecked—Only LAS points that intersect the area of interest will be processed. This is the default.
  • Checked—If any portion of a .las file intersects the area of interest, all the points in that file, including those outside the area of interest, will be processed.
Boolean
Update pyramid
(Optional)

Specifies whether the LAS dataset pyramid will be updated after the class codes are modified.

  • Checked—The LAS dataset pyramid will be updated. This is the default.
  • Unchecked—The LAS dataset pyramid will not be updated.
Boolean

Derived Output

LabelExplanationData Type
Output LAS Dataset

The updated LAS dataset.

LAS Dataset Layer

arcpy.ddd.ChangeLasClassCodes(in_las_dataset, class_codes, {compute_stats}, {extent}, boundary, {process_entire_files}, {update_pyramid})
NameExplanationData Type
in_las_dataset

The LAS dataset that will be processed.

LAS Dataset Layer
class_codes
[[current_class, new_class, synthetic, model_key, withheld, overlap],...]

The class codes that will be modified and the change that will be made to their classification code and classification flags. A value of -1 can be provided for the first column, which is the first item in the list, to modify all class codes.

The existing class code, the new class code, and the new class flag can be represented as a space-delimited string or a list of lists containing the values to be reclassified. For example, a current class code of 5 can be changed to 25 by specifying "5 2" or [[5, 2]]. A change to the synthetic class flag can be made by adding the keyword for the modification ("5 2 SET" or [[5, 2, "SET"]]). Multiple changes can be specified as a semicolon-delimited string (for example, "5 2; 8 3; 1 4") or as a list of lists (for example, [[5, 2], [8, 3], [1, 4]]).

Value Table
compute_stats
(Optional)

Specifies whether statistics will be computed for the .las files referenced by the LAS dataset. Computing statistics provides a spatial index for each .las file, which improves analysis and display performance. Statistics also enhance the filtering and symbology experience by limiting the display of LAS attributes, such as classification codes and return information, to values that are present in the .las file.

  • COMPUTE_STATSStatistics will be computed. This is the default.
  • NO_COMPUTE_STATSStatistics will not be computed.
Boolean
extent
(Optional)

The extent of the data that will be evaluated.

  • MAXOF—The maximum extent of all inputs will be used.
  • MINOF—The minimum area common to all inputs will be used.
  • DISPLAY—The extent is equal to the visible display.
  • Layer name—The extent of the specified layer will be used.
  • Extent object—The extent of the specified object will be used.
  • Space delimited string of coordinates—The extent of the specified string will be used. Coordinates are expressed in the order of x-min, y-min, x-max, y-max.
Extent
boundary

The polygon feature or features that will define the area to be processed.

Feature Layer
process_entire_files
(Optional)

Specifies how the processing extent will be applied.

  • PROCESS_EXTENTOnly LAS points that intersect the area of interest will be processed. This is the default.
  • PROCESS_ENTIRE_FILESIf any portion of a .las file intersects the area of interest, all the points in that file, including those outside the area of interest, will be processed.
Boolean
update_pyramid
(Optional)

Specifies whether the LAS dataset pyramid will be updated after the class codes are modified.

  • UPDATE_PYRAMIDThe LAS dataset pyramid will be updated. This is the default.
  • NO_UPDATE_PYRAMIDThe LAS dataset pyramid will not be updated.
Boolean

Derived Output

NameExplanationData Type
derived_las_dataset

The updated LAS dataset.

LAS Dataset Layer

Code sample

ChangeLasClassCodes example 1 (Python window)

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

arcpy.env.workspace = 'C:/data'
arcpy.ddd.ChangeLasClassCodes('test.lasd', [[5, 2], [3, 1], [4, 6]],
                           'COMPUTE_STATS')
ChangeLasClassCodes example 2 (stand-alone script)

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

'''****************************************************************************
Name: Update LAS 1.0 Classification to ASPRS 1.1 Specs
Description: Updates classification of version 1.0 LAS files to conform to
             the standardized class codes introduced in the 1.1 specifications.
             The code is designed for use as a script tool.
****************************************************************************'''
# Import system modules
import arcpy

# Set Local Variables
inLas = arcpy.GetParameterAsText(0)
recursion = arcpy.GetParameterAsText(1)
lasd = arcpy.GetParameterAsText(2)
reclassList = arcpy.GetParameterAsText(3) #List of values '<oldCode> <newCode>'
calcStats = arcpy.GetParameter(4)

# Execute CreateLasDataset
arcpy.management.CreateLasDataset(inLas, lasd, recursion)
# Execute ChangeLasClassCodes
arcpy.ddd.ChangeLasClassCodes(lasd, reclassList, calcStats)

Licensing information

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

Related topics