Skip to main content

Classification Taxonomy

Overview​

This library uses a building-focused classification schema that differs from the standard ASPRS classification. Point cloud classifications are automatically remapped from ASPRS codes to LOD2 or LOD3 taxonomies designed for detailed architectural analysis.

Important

When you see buildings classified as Class 0, this is CORRECT! The LOD2 schema maps buildings to class 0 (wall) as the base category for detailed building analysis.

LOD2 Classification Schema (15 Classes)​

LOD2 is designed for building structure analysis with basic architectural elements.

Building Elements​

Class IDClass NameDescriptionASPRS Source
0wallBuilding walls and main structure6 (Building)
1roof_flatFlat roof surfacesβ€”
2roof_gableGable/pitched roofβ€”
3roof_hipHip roofβ€”
4chimneyChimney structuresβ€”
5dormerDormer windowsβ€”
6balconyBalconies and terracesβ€”
7overhangOverhanging elementsβ€”
8foundationBuilding foundationβ€”

Context Elements (Non-Building)​

Class IDClass NameDescriptionASPRS Source
9groundGround surface, roads2 (Ground), 11 (Road)
10vegetation_lowLow vegetation, shrubs3, 4 (Low/Med Veg)
11vegetation_highTrees, high vegetation5 (High Vegetation)
12waterWater bodies9 (Water)
13vehicleVehicles, mobile objects17 (Bridge Deck)
14otherUnclassified objects0, 1, 8, 10-16, 18

LOD3 Classification Schema (30 Classes)​

LOD3 provides detailed architectural classification including facade elements.

Structural Elements​

Class IDClass NameDescription
0wall_plainPlain wall without openings
1wall_with_windowsWall with window openings
2wall_with_doorWall with door openings
8chimneyChimney structures
19pillarStructural pillars
20corniceDecorative cornices
21foundationBuilding foundation

Roof Elements​

Class IDClass NameDescription
3roof_flatFlat roof surfaces
4roof_gableGable/pitched roof
5roof_hipHip roof
6roof_mansardMansard roof
7roof_gambrelGambrel roof
9dormer_gableGable dormer
10dormer_shedShed dormer
11skylightRoof skylights
12roof_edgeRoof edges/gutters

Openings​

Class IDClass NameDescription
13windowStandard windows
14doorEntry doors
15garage_doorGarage doors
22basement_windowBasement windows

Facade Elements​

Class IDClass NameDescription
16balconyBalconies
17balustradeBalustrades/railings
18overhangOverhanging elements

Context Elements​

Class IDClass NameDescription
23groundGround surface
24vegetation_lowLow vegetation
25vegetation_highTrees
26waterWater bodies
27vehicleVehicles
28street_furnitureUrban furniture
29otherOther/unclassified

ASPRS to LOD Mapping​

How It Works​

When processing LiDAR files, the pipeline automatically remaps ASPRS standard classifications to LOD schemas:

# Example: ASPRS class 6 (Building) β†’ LOD2 class 0 (wall)
original_classification = 6 # ASPRS Building
lod2_classification = 0 # LOD2 Wall

# Example: ASPRS class 2 (Ground) β†’ LOD2 class 9 (ground)
original_classification = 2 # ASPRS Ground
lod2_classification = 9 # LOD2 Ground
```python
# Output shows LOD2 classifications

ASPRS to LOD2 Mapping Table​

ASPRS CodeASPRS NameLOD2 ClassLOD2 Name
0Never classified14other
1Unclassified14other
2Ground9ground
3Low Vegetation10vegetation_low
4Medium Vegetation10vegetation_low
5High Vegetation11vegetation_high
6Building0wall
7Low Point (noise)10vegetation_low
8Model Key-point14other
9Water12water
10Rail14other
11Road Surface14other
17Bridge Deck13vehicle
18High Noise11vegetation_high

ASPRS to LOD3 Mapping Table​

ASPRS CodeASPRS NameLOD3 ClassLOD3 Name
0Never classified29other
1Unclassified29other
2Ground23ground
3Low Vegetation24vegetation_low
4Medium Vegetation24vegetation_low
5High Vegetation25vegetation_high
6Building0wall_plain
7Low Point (noise)24vegetation_low
8Model Key-point29other
9Water26water
10Rail29other
11Road Surface23ground
17Bridge Deck27vehicle
18High Noise25vegetation_high

Understanding Your Classifications​

Example Output Analysis​

When you inspect an enriched LAZ file, you might see:

Classification distribution in the file:
============================================================
Class 0: 2,644,762 points ( 12.30%) β†’ WALLS (building structure)
Class 9: 9,024,921 points ( 41.96%) β†’ GROUND (terrain)
Class 10: 292,956 points ( 1.36%) β†’ VEGETATION LOW (shrubs)
Class 11: 7,953,872 points ( 36.98%) β†’ VEGETATION HIGH (trees)
Class 12: 674 points ( 0.00%) β†’ WATER
Class 14: 1,591,015 points ( 7.40%) β†’ OTHER (unclassified)

This is the expected behavior! Buildings are classified as Class 0 (wall) in the LOD2 schema.

Why This Approach?​

The LOD-focused taxonomy provides several advantages:

  1. Building-Centric Analysis: Optimized for architectural feature detection
  2. Hierarchical Structure: Buildings are subdivided into structural components
  3. ML Training: Better class balance for machine learning models
  4. Semantic Richness: More meaningful categories for urban analysis

Checking Classifications​

Using Python​

import laspy
import numpy as np
from ign_lidar.classes import LOD2_CLASSES

# Load LAZ file
las = laspy.read("your_file.laz")

# Get classification distribution
unique, counts = np.unique(las.classification, return_counts=True)

# Print with LOD2 names
class_names = {v: k for k, v in LOD2_CLASSES.items()}
for cls, count in zip(unique, counts):
name = class_names.get(cls, "unknown")
percentage = (count / len(las.classification)) * 100
print(f"Class {cls:3d} ({name:20s}): {count:10,} ({percentage:6.2f}%)")

Using CloudCompare​

  1. Open the enriched LAZ file in CloudCompare
  2. Select the point cloud in the DB Tree
  3. Go to Edit > Scalar Fields > Classification
  4. The classification values correspond to LOD2/LOD3 schema, not ASPRS

Configuration Options​

Disabling Remapping (Use ASPRS Classes)​

If you need to preserve original ASPRS classifications, modify the configuration:

processor:
lod_level: null # Disable LOD remapping
preserve_asprs_classes: true

Custom Class Mapping​

You can define custom mappings in ign_lidar/classes.py:

# Custom mapping example
CUSTOM_MAPPING = {
6: 100, # Map buildings to class 100 instead of 0
2: 101, # Map ground to class 101 instead of 9
# ... etc
}

Implementation Details​

The remapping occurs in ign_lidar/core/processor.py:

# Remap ASPRS classifications to LOD schema
labels_v = np.array([
self.class_mapping.get(c, self.default_class)
for c in classification_v
], dtype=np.uint8)

The mapping dictionaries are defined in ign_lidar/classes.py:

  • LOD2_CLASSES: LOD2 taxonomy (15 classes)
  • LOD3_CLASSES: LOD3 taxonomy (30 classes)
  • ASPRS_TO_LOD2: ASPRS β†’ LOD2 mapping
  • ASPRS_TO_LOD3: ASPRS β†’ LOD3 mapping

References​

  • ASPRS LAS Specification 1.4: Standard LiDAR classification codes
  • CityGML LOD Specification: Level of Detail standards for 3D city models
  • OGC 3D Portrayal Service: 3D geospatial visualization standards