Geometric Features
Complete reference for geometric features computed from LiDAR point clouds. All features in v2.4.0+ are guaranteed to be within valid ranges for optimal ML stability.
π― Feature Validation (v2.4.0+)β
Guaranteed Rangesβ
All geometric features are validated and clamped to prevent numerical artifacts:
- Shape Descriptors: [0, 1] - linearity, planarity, sphericity, etc.
- Eigenvalue Features: [0, β) with negative values clamped to 0
- Density Features: [0, 1] - normalized and capped at 1000 pts/mΒ³
- Normal Components: [-1, 1] - unit vectors
- Curvature: [0, 1] - MAD-based, outlier-robust
v2.4.0+ guarantees zero NaN/Inf values and eliminates out-of-range warnings!
π Feature Categoriesβ
Core Geometric Featuresβ
Surface Normals (3 features)β
Computed via eigenvalue decomposition of local covariance matrix.
normal_x
: X component of surface normalnormal_y
: Y component of surface normalnormal_z
: Z component of surface normal (verticality indicator)
Range: [-1, 1] each (unit vector)
Use Case: Surface orientation, wall/roof detection
Curvature (1 feature)β
curvature
: Principal curvature based on smallest eigenvalue
Formula: Ξ»β / (Ξ»β + Ξ»β + Ξ»β)
Range: [0, 1] (validated)
Use Case: Edge detection, curved structures
Shape Descriptors (Weinmann et al., 2015)β
All computed from sorted eigenvalues Ξ»β β₯ Ξ»β β₯ Ξ»β:
Linearityβ
- Formula:
(Ξ»β - Ξ»β) / Ξ»β
- Range: [0, 1] (validated)
- Interpretation: 1.0 = perfect line (edges, cables)
- Use Case: Edge detection, linear structures
Planarityβ
- Formula:
(Ξ»β - Ξ»β) / Ξ»β
- Range: [0, 1] (validated)
- Interpretation: 1.0 = perfect plane (walls, roofs)
- Use Case: Building surface detection, most important feature
Sphericityβ
- Formula:
Ξ»β / Ξ»β
- Range: [0, 1] (validated)
- Interpretation: 1.0 = isotropic (vegetation, noise)
- Use Case: Vegetation vs. building separation
Anisotropyβ
- Formula:
(Ξ»β - Ξ»β) / Ξ»β
- Range: [0, 1] (validated)
- Interpretation: Directional variation
- Use Case: General shape characterization
Roughnessβ
- Formula:
Ξ»β / (Ξ»β + Ξ»β + Ξ»β)
- Range: [0, 1] (validated)
- Interpretation: Surface texture (smooth vs. rough)
- Use Case: Material classification
Omnivarianceβ
- Formula:
(Ξ»β Γ Ξ»β Γ Ξ»β)^(1/3) / Ξ»β
- Range: [0, 1] (validated)
- Interpretation: 3D dispersion (geometric mean)
- Use Case: Volume-based features
v2.4.0+ ensures: Linearity + Planarity + Sphericity β 1.0 through eigenvalue clamping.
Eigenvalue Features (5 features)β
Direct eigenvalue access for advanced analysis:
eigenvalue_1
: Largest eigenvalue (Ξ»β) - dominant directioneigenvalue_2
: Medium eigenvalue (Ξ»β) - secondary directioneigenvalue_3
: Smallest eigenvalue (Ξ»β) - surface flatness
Validation: np.maximum(eigenvalues, 0.0)
- prevents negative values
Eigenvalue Statisticsβ
-
sum_eigenvalues
: Σλ = Ξ»β + Ξ»β + Ξ»β- Range: [0, β)
- Use Case: Local scale, neighborhood size
-
eigenentropy
: Shannon entropy of eigenvalues- Formula:
-Ξ£(pα΅’ log pα΅’) / log(3)
wherepᡒ = λᡒ / Σλ
- Range: [0, 1] (normalized)
- Use Case: Structural complexity
- Formula:
-
change_curvature
: Variance of eigenvalues- Formula: Variance(Ξ»β, Ξ»β, Ξ»β)
- Range: [0, β)
- Use Case: Surface change detection
Height Features (2 features)β
Height Above Groundβ
height_above_ground
: Elevation above ground level (meters)- Range: [0, max_z] (absolute)
- Use Case: Critical for building detection
Vertical Variationβ
vertical_std
: Standard deviation of Z coordinates in neighborhood- Range: [0, β) (meters)
- Use Case: Vertical complexity, terrain variation
Building-Specific Scores (3 features)β
Derived features optimized for architectural modeling:
Verticalityβ
- Formula:
1.0 - abs(normal_z)
- Range: [0, 1] (validated)
- Interpretation: 1.0 = perfectly vertical surface
- Use Case: Wall detection (critical)
Wall Scoreβ
- Formula:
planarity Γ verticality
- Range: [0, 1] (validated)
- Interpretation: High = likely wall surface
- Use Case: Direct wall classification hint
Roof Scoreβ
- Formula:
planarity Γ (1 - verticality)
(horizontality) - Range: [0, 1] (validated)
- Interpretation: High = likely roof surface
- Use Case: Direct roof classification hint
Wall/roof scores dramatically improve LOD3 architectural classification!
Density & Neighborhood (4 features)β
Local point cloud density characteristics:
Densityβ
- Formula:
min(num_neighbors / volume, 1000.0) / 1000.0
- Range: [0, 1] (validated, capped at 1000 pts/mΒ³)
- Use Case: Dense urban vs. sparse areas
Number of Pointsβ
num_points_2m
: Count of points within 2m radius- Range: [0, β) (count)
- Use Case: Local density proxy
Neighborhood Extentβ
neighborhood_extent
: Maximum distance to k-th neighbor- Range: [0, β) (meters)
- Use Case: Local scale indicator
Height Extent Ratioβ
- Formula:
vertical_std / neighborhood_extent
- Range: [0, 1] (validated)
- Use Case: Vertical vs. horizontal extent comparison
Architectural Features (4 features)β
Advanced features for fine-scale structure detection:
Edge Strengthβ
- Formula: Based on eigenvalue variance
- Range: [0, 1] (normalized)
- Use Case: Building edge/corner detection
Corner Likelihoodβ
- Formula: Similarity of all three eigenvalues
- Range: [0, 1] (normalized)
- Use Case: Corner and junction detection
Overhang Indicatorβ
- Formula: Based on normal consistency in vertical neighborhood
- Range: [0, 1] (normalized)
- Use Case: Balcony, overhang, protrusion detection
Surface Roughnessβ
- Formula: Fine-scale surface texture measure
- Range: [0, 1] (normalized)
- Use Case: Material classification, weathering detection
π§ Computation Methodsβ
Eigenvalue Decompositionβ
All shape descriptors derived from covariance matrix:
# Covariance matrix computation
C = (1/(k-1)) * Ξ£(xα΅’ - ΞΌ)α΅(xα΅’ - ΞΌ)
# Eigenvalue decomposition
eigenvalues, eigenvectors = np.linalg.eigh(C)
Ξ»β, Ξ»β, Ξ»β = sorted_eigenvalues(eigenvalues) # descending
# v2.4.0+ validation
Ξ»β, Ξ»β, Ξ»β = np.maximum([Ξ»β, Ξ»β, Ξ»β], 0.0) # Clamp negatives
Search Methodsβ
Radius-Based Search (Recommended)β
features:
use_radius: true # Auto-estimated from point cloud
# Avoids scan line artifacts
Advantages:
- β True geometric neighborhoods
- β Scale-consistent
- β No scan pattern bias
K-Nearest Neighbor Searchβ
features:
use_radius: false
k_neighbors: 30 # Fixed number
Advantages:
- β Consistent neighbor count
- β οΈ May introduce scan line artifacts
K-NN can create dashed line patterns in features. Use radius-based search for best results!
π Feature Importanceβ
Critical for Building Detection (βββββ)β
- planarity - Distinguishes flat surfaces
- height_above_ground - Separates buildings from ground
- verticality - Identifies walls vs. roofs
- normal_z - Direct orientation indicator
Important for Details (ββββ)β
- edge_strength - Building edges and corners
- curvature - Curved structures (balconies, domes)
- wall_score/roof_score - Direct classification hints
- linearity - Edges and cables
Useful for Context (βββ)β
- density - Urban density patterns
- neighborhood_extent - Local scale
- eigenentropy - Structural complexity
π Best Practicesβ
For LOD2 (Basic Building Classification)β
features:
mode: lod2 # Essential 11 features
k_neighbors: 20
use_radius: true
Includes: XYZ, normal_z, planarity, linearity, height, verticality, RGB, NDVI
For LOD3 (Detailed Architectural Modeling)β
features:
mode: lod3 # Complete 35 features
k_neighbors: 30
include_extra: true
use_radius: true
Adds: All eigenvalues, architectural features, density features, building scores
Feature Normalizationβ
# v2.4.0+ features are already validated!
# No need for custom normalization
from ign_lidar import LiDARProcessor
processor = LiDARProcessor(lod_level="LOD3")
patches = processor.process_tile("input.laz", "output/")
# All features guaranteed in valid ranges β
π Troubleshootingβ
Issue: NaN values in featuresβ
Solution: Upgrade to v2.4.0+ for automatic validation
pip install --upgrade ign-lidar-hd
Issue: Out-of-range warningsβ
Solution: v2.4.0+ eliminates these warnings through validation
Issue: Scan line artifactsβ
Solution: Use radius-based search
features:
use_radius: true
Issue: Training instabilityβ
Solution: v2.4.0+ improves convergence through feature validation
π Referencesβ
- Weinmann et al. (2015): "Semantic point cloud interpretation based on optimal neighborhoods, relevant features and efficient classifiers"
- DemantkΓ© et al. (2011): "Dimensionality based scale selection in 3D lidar point clouds"
- West et al. (2004): "Context-driven automated target detection in 3D data"
π Related Documentationβ
Validated. Robust. Production-Ready. β