Skip To Content

Colorize LAS

Summary

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

Illustration

Colorize LAS

Usage

  • In ArcGIS, you can display LAS point clouds using RGB information to achieve an immersive, photorealistic three-dimensional display. The visual feedback of true imagery superimposed onto LAS points also provides greater detail about the nature of the data that was captured, which can be useful when interactively classifying 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 choose not to rearrange the LAS points, then you can elect to 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 may elect to disable the calculation of statistics so that the tool can execute faster.

Syntax

ColorizeLas_3d (in_las_dataset, in_image, bands, target_folder, {name_suffix}, {las_version}, {point_format}, {compression}, {rearrange_points}, {compute_stats}, {out_las_dataset})
ParameterExplanationData Type
in_las_dataset

The LAS dataset to process.

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 that the output LAS files will be written out to.

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 compressed format or in the standard LAS format.

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

Determines whether to rearrange points in the LAS files.

  • NO_REARRANGE_POINTSThe order of the points in the LAS files will remain the same.
  • REARRANGE_POINTSThe points in the LAS files will be rearranged. This is the default.
Boolean
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
out_las_dataset
(Optional)

The output LAS dataset referencing the newly created LAS files.

LAS Dataset

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

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

Related topics