Colorize LAS (3D Analyst)

Summary

Applies colors and near-infrared values from orthographic imagery to LAS points.

Illustration

Colorize LAS

Usage

  • Displaying LAS points using RGB information can provide an immersive, photorealistic display that delivers a unique display experience. The visual feedback of true imagery superimposed onto LAS points can provide insight about the discrete characteristics of the point cloud that can be helpful when interactively classifying the data, digitizing new features, and establishing a reference point when taking 3D distance measurements.

  • The best imagery to use for applying colors to LAS points would be sourced from the same time as the lidar survey to achieve the best match with the features being captured. Lacking that, you would want to try using imagery that is as close to the scan date as possible to minimize differences due to events such as construction or the seasonal variation of deciduous leaves.

  • If your source imagery is composed of numerous tiled images, consider loading those tiles into a mosaic dataset to reference them as a single dataset and use it as the image input for colorizing your LAS data. Learn more about creating a mosaic dataset.

  • Only LAS file version 1.4 with point record format 8 supports the storage of near-infrared values for LAS points.

  • When a processing extent is defined, the entire LAS file that intersects the processing extent will be colorized. If only a subset of the input LAS file is desired, consider using the Extract LAS tool to clip out the subset, and use the resulting file as the input for this tool.

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

Parameters

LabelExplanationData Type
Input LAS Dataset

The LAS dataset that will be processed.

LAS Dataset Layer
Input Image

The image that will be used to assign colors to LAS points.

Mosaic Layer; Raster Layer
Band Assignment

The bands from the input image that will be assigned to the color channels associated with the output LAS points.

Value Table
Target Folder

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

Folder
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 specified in this parameter.

String
LAS File Version
(Optional)

The LAS version of the output files being created.

  • LAS 1.2 FilesLAS file version 1.2 will be created.
  • LAS 1.3 FilesLAS file version 1.3 will be created.
  • LAS 1.4 FilesLAS file version 1.4 will be created. This is the default.
String
Point Format
(Optional)

The point record format of the output LAS files.

  • 2Point record format 2.
  • 3Point record format 3 supports the storage of GPS time.
  • 7Point record format 7. This is the default value and is only available for LAS version 1.4
  • 8Point record format 8 supports the storage of near-infrared values. This is only available for LAS version 1.4.
Long
Compression
(Optional)

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

  • No CompressionThe output will be in the standard LAS format (*.las file). This is the default.
  • zLAS CompressionOutput .las files will be compressed in the zLAS format.
String
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

Derived Output

LabelExplanationData Type
Output Folder

The folder that the output LAS files will be written out to.

Folder

arcpy.ddd.ColorizeLas(in_las_dataset, in_image, bands, target_folder, {name_suffix}, {las_version}, {point_format}, {compression}, {rearrange_points}, {compute_stats}, {out_las_dataset})
NameExplanationData Type
in_las_dataset

The LAS dataset that will be processed.

LAS Dataset Layer
in_image

The image that will be used to assign colors to LAS points.

Mosaic Layer; Raster Layer
bands
[bands,...]

The bands from the input image that will be assigned to the color channels associated with the output LAS points.

Value Table
target_folder

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

Folder
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 specified in this parameter.

String
las_version
(Optional)

The LAS version of the output files being created.

  • 1.2LAS file version 1.2 will be created.
  • 1.3LAS file version 1.3 will be created.
  • 1.4LAS file version 1.4 will be created. This is the default.
String
point_format
(Optional)

The point record format of the output LAS files.

  • 2Point record format 2.
  • 3Point record format 3 supports the storage of GPS time.
  • 7Point record format 7. This is the default value and is only available for LAS version 1.4
  • 8Point record format 8 supports the storage of near-infrared values. This is only available for LAS version 1.4.
Long
compression
(Optional)

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

  • NO_COMPRESSIONThe output will be in the standard LAS format (*.las file). This is the default.
  • ZLASOutput .las files will be compressed in the zLAS format.
String
rearrange_points
(Optional)

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

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

Derived Output

NameExplanationData Type
output_folder

The folder that the output LAS files will be written out to.

Folder

Code sample

ColorizeLas example 1 (Python window)

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

arcpy.env.workspace = 'C:/data'
arcpy.ddd.ColorizeLas('2014_lidar_survey.lasd', '2014_CIR.tif', 
                      'RED Band_1; GREEN Band_2; BLUE Band_3', 
                      'las/rgb', '_rgb', 1.3, 3, 'ZLAS', 
                      'REARRANGE_POINTS')
ColorizeLas 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())

Licensing information

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

Related topics