Extract LAS (3D Analyst)

Summary

Creates LAS files from point cloud data in a LAS dataset or point cloud scene layer.

Illustration

Extract LAS tool illustration

Usage

  • This tool creates .las or .zlas files from a LAS dataset, point cloud .slpk file, or I3S point cloud scene layer service. When the input is a LAS dataset, one output file will be created for each .las or .zlas file referenced by the LAS dataset. When the input is a point cloud scene layer, the number of output files depends on the number of points being extracted. Each output file is limited in size to approximately 16.7 million points.

  • The input point cloud can be filtered to limit the points that will be extracted using any combination of classification codes, classification flags, and return values. Point filters can be defined by loading the layer into a map or scene and specifying the filters on the Layer Properties dialog box. Point filters can also be applied to a LAS dataset using the Make LAS Dataset Layer tool. Additionally, you can extract a subset of the input point cloud by specifying a processing extent and an extraction boundary. When a processing extent is provided with an extraction boundary, the intersection of both will be used to create the output files. If neither the processing extent nor the extraction boundary is defined, the entire input point cloud will be processed.

  • When the input is an I3S point cloud scene layer service or an .slpk file, multiple output files may be created. The resulting files may have overlapping extents, which can lead to inefficient data processing in certain situations. The Tile LAS tool can be used to create new LAS files that are divided along a regular grid to produce nonoverlapping files.

  • When the input is a LAS dataset, the resulting LAS file version and point record format of the outputs will match the source file. When the input is an I3S point cloud scene layer service or an .slpk file, the output will be created as LAS file version 1.4, but the point record format will depend on the attributes of the source point cloud as follows:

    • Point format 6 will be used if the input does not contain RGB or near-infrared values.
    • Point format 7 will be used if the input contains RGB but does not have near-infrared values.
    • Point format 8 will be used if the input contains RGB and near-infrared values.

    To use a different LAS file version and point record format, they can be generated by processing the output files generated by this tool with the Convert LAS tool.

  • The spatial reference of a .las file is typically defined in the file. If this information is missing or incorrect, an auxiliary .prj file can define the LAS file's spatial reference. The .prj file must reside in the same location as the .las file and have the same name as the .las file. When present, the .prj file will override the spatial reference information in the .las file. You can create .prj files for .las files with a missing or incorrectly defined spatial reference using the Define Projection tool for an individual .las or .zlas file or the Create LAS Dataset tool through the Create PRJ For LAS Files parameter.

  • The input point cloud can have its horizontal coordinate system reprojected into a different spatial reference by specifying the Output Coordinate System environment setting. Additionally, z-unit conversions can be achieved by ensuring that the vertical units are defined through a vertical coordinate system. However, a vertical datum transformation is not currently supported. You must ensure that any horizontal coordinate system conversion can maintain the original vertical coordinate system.

  • It is not uncommon for LAS point records to be stored in the .las file in a binary sequence that does not correspond with the spatial clustering of the points. When data of such distribution is queried, it can result in less efficient access to the binary records that represent the LAS points. Rearranging the points in the resulting .las file will optimize the data for visualization and other spatial operations. Statistics will automatically be calculated when the rearrange option is enabled. If you don't rearrange the LAS points, you can enable or disable the calculation of statistics. Calculating statistics will optimize spatial queries and provide a summary of the class codes and return values that are present in the .las file. However, it will also add time to the processing of this tool. If the resulting .las files will not be used in ArcGIS, you can disable the calculation of statistics so that the tool can process faster.

  • The Extraction Boundary parameter will be used to clip the input point cloud to an irregular shape. This parameter supports a polygon boundary that defines a contiguous study area, such as a single polygon feature covering a relatively large region. While multiple polygons representing neighboring areas of interest can be provided as input, the boundary feature does not support polygons which represent a high number of small features like trees or buildings. Multiple polygons are merged together to efficiently clip the input point cloud. For this reason, specifying a boundary feature with many small polygons will result in slow performance and should be avoided.

Parameters

LabelExplanationData Type
Input Point Cloud

The LAS dataset, point cloud scene layer package (.slpk file), or I3S point cloud service that will be extracted. An I3S point cloud service must have the export property enabled to be processed.

LAS Dataset Layer; Scene Layer; File
Target Folder

The existing folder where the output .las files will be written.

Folder
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. This option is only available when there is an active map.
  • 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.
  • 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.
  • 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.

    The map may be using different display units

Extent
Extraction Boundary
(Optional)

A polygon boundary that will be used to clip the input point cloud. This boundary should represent a primary study area that is typically defined by one contiguous polygon, but it can also be composed of more than one polygon when it represents a common study area with a relevant spatial gap.

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
Output File Name Suffix
(Optional)

The text that will be appended to the name of each output .las file. Each file will inherit its base name from its source file, followed by the suffix provided in this parameter.

String
Remove Variable Length Records
(Optional)

Specifies whether variable length records (VLRs) will be removed. Each .las file may contain a set of VLRs that were added by the software that produced it. The meaning of these records is typically only known by the originating software. Unless the output LAS data will be processed by an application that understands this information, retaining the VLRs may not provide any value-added functionality. Removing the VLRs may save significant disk space depending on their total size and the number of files containing them.

  • Unchecked—The variable length records in the input .las files will not be removed and will remain in the output. This is the default.
  • Checked—The variable length records in the input .las files will be removed from the output.
Boolean
Rearrange points
(Optional)

Specifies whether points in the .las files will be rearranged.

  • Unchecked—The order of the points in the .las files will not be rearranged.
  • Checked—The points in the .las files will be rearranged. This is the default.
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
Output LAS Dataset
(Optional)

The output LAS dataset referencing the newly created .las files.

LAS Dataset
Compression
(Optional)

Specifies whether the output .las file will be in a compressed format or the standard LAS format.

  • Same As InputThe compression will be the same as the input. This option is only available when the input is a LAS dataset, and it is the default in that case.
  • No CompressionThe output will be in the standard LAS format (*.las file). This is the default when the input is a point cloud scene layer.
  • zLAS CompressionOutput .las files will be compressed in the zLAS format.
String

Derived Output

LabelExplanationData Type
Output Folder

The folder where the .las files will be written.

Folder

arcpy.ddd.ExtractLas(in_las_dataset, target_folder, {extent}, {boundary}, {process_entire_files}, {name_suffix}, {remove_vlr}, {rearrange_points}, {compute_stats}, {out_las_dataset}, {compression})
NameExplanationData Type
in_las_dataset

The LAS dataset, point cloud scene layer package (.slpk file), or I3S point cloud service that will be extracted. An I3S point cloud service must have the export property enabled to be processed.

LAS Dataset Layer; Scene Layer; File
target_folder

The existing folder where the output .las files will be written.

Folder
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
(Optional)

A polygon boundary that will be used to clip the input point cloud. This boundary should represent a primary study area that is typically defined by one contiguous polygon, but it can also be composed of more than one polygon when it represents a common study area with a relevant spatial gap.

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
name_suffix
(Optional)

The text that will be appended to the name of each output .las file. Each file will inherit its base name from its source file, followed by the suffix provided in this parameter.

String
remove_vlr
(Optional)

Specifies whether variable length records (VLRs) will be removed. Each .las file may contain a set of VLRs that were added by the software that produced it. The meaning of these records is typically only known by the originating software. Unless the output LAS data will be processed by an application that understands this information, retaining the VLRs may not provide any value-added functionality. Removing the VLRs may save significant disk space depending on their total size and the number of files containing them.

  • MAINTAIN_VLRAny data stored in the processed .las file's variable length records will not be removed and will remain in the extracted files. This is the default.
  • REMOVE_VLRThe additional variable length records will be removed from the .las files.
Boolean
rearrange_points
(Optional)

Specifies whether points in the .las files will be rearranged.

  • MAINTAIN_POINTSThe order of the points in the .las files will not be rearranged.
  • REARRANGE_POINTSThe points in the .las files will be rearranged. This is the default.
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
out_las_dataset
(Optional)

The output LAS dataset referencing the newly created .las files.

LAS Dataset
compression
(Optional)

Specifies whether the output .las file will be in a compressed format or the standard LAS format.

  • SAME_AS_INPUTThe compression will be the same as the input. This option is only available when the input is a LAS dataset, and it is the default in that case.
  • NO_COMPRESSIONThe output will be in the standard LAS format (*.las file). This is the default when the input is a point cloud scene layer.
  • ZLASOutput .las files will be compressed in the zLAS format.
String

Derived Output

NameExplanationData Type
out_folder

The folder where the .las files will be written.

Folder

Code sample

ExtractLas 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.ddd.ExtractLas('test.lasd', 'c:/lidar/subset', boundary='study_area.shp',
                     name_suffix='subset', remove_vlr=True, 
                     rearrange_points='REARRANGE_POINTS', 
                     out_las_dataset='extracted_lidar.lasd')
ExtractLas example 2 (stand-alone script)

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

'''****************************************************************************
Name: Split Large LAS File
Description: Divides a large LAS file whose point distribution covers the full
             XY extent of the data into smaller files to optimize performance
             when reading lidar data.
****************************************************************************'''
# Import system modules
import arcpy
import tempfile
import math

in_las_file = arcpy.GetParameterAsText(0)
tile_width = arcpy.GetParameter(1) # double in LAS file's XY linear unit
tile_height = arcpy.GetParameter(2) # double in LAS file's XY linear unit
out_folder = arcpy.GetParameterAsText(3) # folder for LAS files
out_name_suffix = arcpy.GetParameterAsText(4) # basename for output files
out_lasd = arcpy.GetParameterAsText(5) # output LAS dataset


try:
    temp_lasd = arcpy.CreateUniqueName('temp.lasd', tempfile.gettempdir())
    arcpy.management.CreateLasDataset(in_las_file, temp_lasd, 
                                      compute_stats='COMPUTE_STATS')
    desc = arcpy.Describe(temp_lasd)
    total_columns = int(math.ceil(desc.extent.width/tile_width))
    total_rows = int(math.ceil(desc.extent.height/tile_height))
    digits = int(math.log10(max(cols, rows))) + 1
    for row in range(1, total_rows+1):
        yMin = desc.extent.YMin + tile_height*(row-1)
        yMax = desc.extent.YMin + tile_height*(row)
        for col in range (1, total_columns+1):
            xMin = desc.extent.XMin + tile_width*(col-1)
            xMax = desc.extent.XMax + tile_width*(col)
            name_suffix = '_{0}_{1}x{2}'.format(out_name_suffix, 
                                                str(row).zfill(digits), 
                                                str(col).zfill(digits))
            arcpy.ddd.ExtractLas(temp_lasd, out_folder, 
                                 arcpy.Extent(xMin, yMin, xMax, yMax),
                                 name_suffix=name_suffix, 
                                 rearrange_points='REARRANGE_POINTS',
                                 compute_stats='COMPUTE_STATS')
    arcpy.env.workspace = out_folder
    arcpy.management.CreateLasDataset(arcpy.ListFiles('*{0}*.las'.format(out_name_suffix)),
                                      out_lasd, compute_stats='COMPUTE_STATS',
                                      relative_paths='RELATIVE_PATHS')
except arcpy.ExecuteError:
    print(arcpy.GetMessages())

Licensing information

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

Related topics