Summary
Classifies building rooftops and sides in LAS data.
Illustration
Usage
The LAS data must have classified ground points before you can classify building rooftop points. Consider using the Classify LAS Ground tool if ground points have not been classified. The ground points must have a class code value of 2. If ground points have a class code value other than 2, use the Change LAS Class Codes tool to reassign the class code accordingly.
LAS points with class code values of 0, 1, and 6 will be evaluated to determine if they fit the characteristics of building rooftops. Points classified as buildings that do not meet this criteria will be reassigned to a class code value of 1 unless the option to reuse existing building classified points is specified.
The Method parameter is not used when the Is photogrammetric data option is specified.
Syntax
arcpy.ddd.ClassifyLasBuilding(in_las_dataset, {min_height}, min_area, {compute_stats}, {extent}, boundary, {process_entire_files}, point_spacing, {reuse_building}, {photogrammetric_data}, {method}, {classify_above_roof}, {above_roof_height}, {above_roof_code})
Parameter | Explanation | Data Type |
in_las_dataset | The LAS dataset to be classified. | LAS Dataset Layer |
min_height (Optional) | The height from the ground that defines the lowest point from which rooftop points will be identified. | Linear Unit |
min_area | The smallest area of the building rooftop. | Areal Unit |
compute_stats (Optional) | Specifies whether statistics should 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, like classification codes and return information, to values that are present in the LAS file.
| Boolean |
extent (Optional) | Specifies the extent of the data that will be evaluated by this tool. | Extent |
boundary | A polygon feature that defines the area of interest to be processed by this tool. | Feature Layer |
process_entire_files (Optional) | Specifies how the processing extent is applied.
| Boolean |
point_spacing | The average spacing of LAS points. This parameter is no longer used. | Linear Unit |
reuse_building (Optional) | Specifies whether the existing building classified points will be reused or reevaluated. Specifies whether the existing building classified points will be reused or reevaluated.
| Boolean |
photogrammetric_data (Optional) | Specifies whether the points in the LAS file were derived using a photogrammetric technique. Specifies whether the points in the LAS file were derived using a photogrammetric technique.
| Boolean |
method (Optional) | The classification method that will be used.
| String |
classify_above_roof (Optional) | Specifies whether points above the planes detected for the roof will be classified.
| Boolean |
above_roof_height (Optional) | The maximum height of the points above the building rooftop that will be classified to the value designated in the Above Roof Class Code parameter. | Linear Unit |
above_roof_code (Optional) | The class code that will be assigned to points above the roof. | Long |
Derived Output
Name | Explanation | Data Type |
derived_las_dataset | The LAS dataset that is classified for building rooftops. | LAS Dataset Layer |
Code sample
ClassifyLasBuilding example 1 (Python window)
The following sample demonstrates the use of this tool in the Python window.
arcpy.env.workspace = 'C:/data'
arcpy.ClassifyLasBuilding_3d('Highland.lasd', minHeight='9 feet',
minArea='30 Square Feet', compute_stats=True)
ClassifyLasBuilding example 2 (stand-alone script)
The following sample demonstrates the use of this tool in a stand-alone Python script.
'''****************************************************************************
Name: Tile & Classify LAS Files
Description: Creates & classifies tiled LAS files.
****************************************************************************'''
# Import system modules
import arcpy
import tempfile
import math
in_las = arcpy.GetParameterAsText(1) # The LAS files that need to be tiled
out_folder = arcpy.GetParameterAsText(2) # folder for LAS files
basename = arcpy.GetParameterAsText(3) # basename for output files
out_lasd = arcpy.GetParameterAsText(4) # output LAS dataset
try:
# Create temp LAS dataset to reference LAS files that will be tiled
temp_lasd = arcpy.CreateUniqueName('temp.lasd', tempfile.gettempdir())
arcpy.management.CreateLasDataset(in_las, temp_lasd)
arcpy.ddd.TileLas(temp_lasd, out_folder, basename, out_lasd, las_version=1.4,
point_format=7, file_size=300)
arcpy.management.Delete(temp_lasd)
arcpy.ddd.ClassifyLasGround(out_lasd, method='AGGRESSIVE')
arcpy.ddd.ClassifyLasBuilding(out_lasd, min_height='3 Meters', min_area='4 Meters')
arcpy.ddd.ClassifyLasByHeight(out_lasd, height_classification=[(3, 6), (4,20), (5,70)],
noise='All Noise', compute_stats='COMPUTE_STATS')
except arcpy.ExecuteError:
print(arcpy.GetMessages())
Environments
Licensing information
- Basic: Requires 3D Analyst
- Standard: Requires 3D Analyst
- Advanced: Requires 3D Analyst