Classify LAS Overlap (3D Analyst)

Summary

Classifies LAS points from overlapping scans of aerial lidar surveys.

Illustration

Classify LAS Overlap tool illustration

Usage

  • Achieving a regular distribution of points often improves the performance of downstream tools. Data derived from points with irregular distribution may yield an undesirable margin of error. When aerial lidar surveys have LAS points from overlapping flight lines, the LAS data will usually have a higher density of points in the area of overlap. The scan angle of points from the different flight lines may also vary widely. Typically, points with larger scan angles will have a larger margin of error than points whose scan angles are closer to nadir. Classifying overlap points allows the LAS data to be filtered in a way that produces a consistent point density. The overlap designation allows the points to be filtered and excluded from visualization and downstream analysis operations.

  • The point source ID attribute of a LAS point identifies the flight line from which the point was collected. This attribute is used to establish the presence of overlap points. The LAS data is evaluated in a given sampling distance. When points with different point source IDs are found within the area being evaluated, the scan angle is used to establish which point source ID represents the nonoverlapping points. The point source ID of the point with the scan angle that is closest to 0, or nadir, will be retained as nonoverlap points. The points associated with the remaining point source IDs will be marked as overlap.

    The sample size used to evaluate the LAS points should be approximately two to three times the size of the nominal point spacing of the LAS data. Using a larger sampling distance introduces the possibility of misclassifying points, and using smaller sampling sizes may not capture enough points to properly identify the overlap points.

  • This tool works on tiled .las or .zlas files that combine point records from multiple flight lines. Each file is processed independently, which means overlapping points will not be detected if each flight line is stored in a separate file. Use the Tile LAS tool to merge such files.

  • Overlap points in LAS version 1.4 files with point record formats 6 through 8 will be assigned the overlap classification flag. This allows the points to retain their original classification value. Overlap points in all other supported .las files will be assigned a class code value of 12. If the class code value of 12 is being used by the input .las files to represent something other than overlapping scans, you can use the Change LAS Class Codes tool to reassign those points to another value before running this tool.

Parameters

LabelExplanationData Type
Input LAS Dataset

The tiled LAS dataset that will be processed.

LAS Dataset Layer
Sample Distance

The distance of either dimension of the square area that will be used to evaluate the LAS data. If Unknown is specified as the linear unit, the unit will be defined by the spatial reference of the input .las file.

Linear Unit
Processing Extent
(Optional)

The extent of the data that will be evaluated.

  • Current Display Extent Current Display Extent—The extent will be based on the active map or scene. This option is only available when there is an active map.
  • Draw Extent Draw Extent—The extent will be based on a rectangle drawn on the map or scene. This option will create a feature class in the project geodatabase and add a layer to the map. The feature class will have the same coordinate system as the map.
    Note:

    This option is not available in the Environments dialog box. It is only available from a tool parameter with an extent data type or from the Environments tab on a tool dialog box.

    Note:

    When the Enable and disable editing from the Edit tab editing option is checked, you must enable editing on the Edit ribbon tab to draw the extent.

  • Extent of a Layer Layer—The extent will be based on an active map layer. Use the drop-down list to choose an available layer or use the Extent of data in all layers option to get the combined extent of all active map layers, excluding the basemap. This option is only available when there is an active map with layers.

    Each map layer has the following options:

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

      The extents from the Selected Features Area from Selected Features and Visible Features Extent Indicator options are only available for feature layers.

  • Browse Browse—The extent will be based on an existing dataset.
  • Intersection of Inputs Intersect—The extent will be based on the minimum or intersecting extent of all inputs. If no inputs overlap, a null extent with all zeros will result.
  • Union of Inputs Union—The extent will be based on the maximum or combined extent of all inputs.
  • Clipboard Paste—The extent can be copied to and from the clipboard.
    • Copy Extent Copy—Copies the extent coordinates and coordinate system to the clipboard.
    • Paste Extent Paste—Pastes the extent coordinates and, optionally, the coordinate system from the clipboard. If the clipboard values do not include a coordinate system, the extent will use the map’s coordinate system.
    Note:

    The extent coordinates are copied to and pasted from the clipboard using the same formatting and order as the ArcPy Extent object: x-min, y-min, x-max, y-max, and the spatial reference.

  • Reset Extent Reset—The extent will be reset to the default value.
  • Manually entered coordinates—The coordinates must be numeric values and in the active map's coordinate system.
    Caution:

    The map may use different display units than the entered coordinates. The use of a cardinal direction (N, S, E, W) is not supported. Use a negative value sign for south and west coordinates.

Extent
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
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
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 LAS dataset to be modified.

LAS Dataset Layer

arcpy.ddd.ClassifyLasOverlap(in_las_dataset, sample_distance, {extent}, {process_entire_files}, {compute_stats}, {update_pyramid})
NameExplanationData Type
in_las_dataset

The tiled LAS dataset that will be processed.

LAS Dataset Layer
sample_distance

The distance of either dimension of the square area that will be used to evaluate the LAS data. This value can be expressed as a number and a linear unit value, such as 3 meters. If linear units are not specified or are entered as Unknown, the unit will be defined by the spatial reference of the input .las file.

Linear Unit
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
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
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
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
out_las_dataset

The LAS dataset to be modified.

LAS Dataset Layer

Code sample

ClassifyLasOverlap example 1 (Python window)

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

arcpy.env.workspace = 'C:/data'

arcpy.ddd.ClassifyLasOverlap('Denver_2.lasd', '1 Meter')
ClassifyLasOverlap example 2 (stand-alone script)

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

'''****************************************************************************
       Name: Classify Lidar & Extract Building Footprints
Description: Extract footprint from lidar points classified as buildings, 
             regularize its geometry, and calculate the building height.

****************************************************************************'''
import arcpy

lasd = arcpy.GetParameterAsText(0)
dem = arcpy.GetParameterAsText(1)
footprint = arcpy.GetParameterAsText(2)

try:
    desc = arcpy.Describe(lasd)
    if desc.spatialReference.linearUnitName in ['Foot_US', 'Foot']:
        unit = 'Feet'
    else:
        unit = 'Meters'
    ptSpacing = desc.pointSpacing * 2.25
    sampling = '{0} {1}'.format(ptSpacing, unit)
    # Classify overlap points
    arcpy.ddd.ClassifyLASOverlap(lasd, sampling)
    # Classify ground points
    arcpy.ddd.ClassifyLasGround(lasd)
    # Filter for ground points
    arcpy.management.MakeLasDatasetLayer(lasd, 'ground', class_code=[2])
    # Generate DEM
    arcpy.conversion.LasDatasetToRaster('ground', dem, 'ELEVATION', 
                                        'BINNING NEAREST NATURAL_NEIGHBOR', 
                                        sampling_type='CELLSIZE', 
                                        sampling_value=desc.pointSpacing)
    # Classify noise points
    arcpy.ddd.ClassifyLasNoise(lasd, method='ISOLATION', edit_las='CLASSIFY', 
                               withheld='WITHHELD', ground=dem, 
                               low_z='-2 feet', high_z='300 feet', 
                               max_neighbors=ptSpacing, step_width=ptSpacing, 
                               step_height='10 feet')
    # Classify buildings
    arcpy.ddd.ClassifyLasBuilding(lasd, '7.5 feet', '80 Square Feet')
    #Classify vegetation
    arcpy.ddd.ClassifyLasByHeight(lasd, 'GROUND', [8, 20, 55], 
                                  compute_stats='COMPUTE_STATS')
    # Filter LAS dataset for building points
    lasd_layer = 'building points'
    arcpy.management.MakeLasDatasetLayer(lasd, lasd_layer, class_code=[6])
    # Export raster from lidar using only building points
    temp_raster = 'in_memory/bldg_raster'
    arcpy.management.LasPointStatsAsRaster(lasd_layer, temp_raster,
                                           'PREDOMINANT_CLASS', 'CELLSIZE', 2.5)
    # Convert building raster to polygon
    temp_footprint = 'in_memory/footprint'
    arcpy.conversion.RasterToPolygon(temp_raster, temp_footprint)
    # Regularize building footprints
    arcpy.ddd.RegularizeBuildingFootprint(temp_footprint, footprint, 
                                          method='RIGHT_ANGLES')

except arcpy.ExecuteError:
    print(arcpy.GetMessages())

Related topics