Skip to main content

IGN LiDAR HD Dataset Processing Library for Building LOD Classification

Project description

IGN LiDAR HD Processing Library

PyPI version PyPI - Downloads Python 3.8+ License: MIT Documentation

Version 3.4.1 | ๐Ÿ“š Full Documentation | ๐Ÿ“– Documentation Index | โš™๏ธ Configuration Guide

LoD3 Building Model

Transform IGN LiDAR HD point clouds into ML-ready datasets for building classification

Quick Start โ€ข What's New โ€ข Features โ€ข Documentation โ€ข Examples


๐Ÿ“Š Overview

A comprehensive Python library for processing French IGN LiDAR HD data into machine learning-ready datasets. Features include GPU acceleration, rich geometric features, RGB/NIR augmentation, and flexible YAML-based configuration.

Key Capabilities:

  • ๐Ÿš€ GPU Acceleration: 16ร— faster processing with optimized batching
  • โšก Optimized Pipeline: 8ร— overall speedup (80min โ†’ 10min per large tile)
  • ๐ŸŽฏ Smart Ground Truth: 10ร— faster classification with auto-method selection
  • ๐ŸŽจ Multi-modal Data: Geometry + RGB + Infrared (NDVI-ready)
  • ๐Ÿ—๏ธ Building Classification: LOD2/LOD3 schemas with 15-30+ classes
  • ๐Ÿ“ฆ Flexible Output: NPZ, HDF5, PyTorch, LAZ formats
  • โš™๏ธ YAML Configuration: Reproducible workflows with example configs
  • ๐ŸŽฒ Rules Framework: Extensible rule-based classification system
  • ๐Ÿ” Gap Detection: Automatic building perimeter gap analysis (NEW in v3.3.3)
  • ๐Ÿ—บ๏ธ Spatial Indexing: Efficient DTM file lookup with rtree (NEW in v3.3.3)

๐Ÿš€ Performance Highlights

Version 3.0.0 delivers exceptional performance through GPU acceleration and intelligent optimization:

Metric Before After Speedup
GPU chunk processing 353s 22s 16ร—
Ground truth labeling 20min ~2min 10ร—
Overall pipeline 80min ~10min 8ร—

Key Optimizations:

  • โœ… GPU-accelerated feature computation with automatic mode selection
  • โœ… Optimized neighbor lookup with adaptive batch sizing
  • โœ… GroundTruthOptimizer with intelligent GPU/CPU method selection
  • โœ… Smart memory management and garbage collection
  • โœ… Parallel processing for CPU operations

Annual Impact: Saves ~1,140 hours for 100 jobs/year ๐ŸŽฏ


โœจ What's New

๐ŸŽฒ Rules Framework (v3.2.0 - October 2025)

NEW: Extensible rule-based classification system with exceptional documentation!

  • Plugin Architecture - Create custom rules without modifying framework
  • 7 Confidence Methods - Binary, linear, sigmoid, gaussian, threshold, exponential, composite
  • Hierarchical Execution - Multi-level classification with coarse-to-fine refinement
  • Type-Safe Design - Complete type hints and dataclass-based API
  • Exceptional Docs - Three-tier documentation (quick ref, guide, architecture)
  • Visual Learning - 15+ Mermaid diagrams showing system design
  • Production Ready - Zero breaking changes, 100% backward compatible
from ign_lidar.core.classification.rules import BaseRule, RuleEngine

class BuildingHeightRule(BaseRule):
    def evaluate(self, context):
        mask = context.additional_features['height'] > 3.0
        return RuleResult(
            point_indices=np.where(mask)[0],
            classifications=np.full(mask.sum(), 6),  # Building
            confidence_scores=np.ones(mask.sum()) * 0.9
        )

engine = RuleEngine()
engine.add_rule(BuildingHeightRule())
result = engine.execute(points, labels)

๐Ÿ“– Documentation:


๐Ÿค– FeatureComputer with Automatic Mode Selection (v3.0.0)

Major Release (October 2025): Intelligent automatic computation mode selection!

  • Automatic GPU/CPU selection - No manual configuration needed
  • Simplified config - One flag instead of multiple GPU settings
  • Expert recommendations - System logs optimal configuration
  • Backward compatible - Existing configs work unchanged
  • Opt-in design - Enable with use_feature_computer: true

Before vs After

# Before: Manual GPU configuration
processor:
  use_gpu: true
  use_gpu_chunked: true
  gpu_batch_size: 5000000

# After: Automatic mode selection
processor:
  use_feature_computer: true  # That's it!

Benefits:

  • โšก Automatic - Selects CPU/GPU/GPU_CHUNKED based on workload
  • ๐ŸŽฏ Smart - Considers tile size, GPU availability, memory
  • ๐Ÿ“Š Transparent - Logs mode selection decisions
  • ๐Ÿ”ง Flexible - Can force specific mode if needed

See Migration Guide for details.


๐ŸŽฏ Unified Configuration System

v3.0.0 introduces a streamlined configuration system:

  • Simplified YAML configuration with sensible defaults
  • Multiple LOD levels (LOD2, LOD3) for different use cases
  • Flexible feature selection - enable only what you need
  • Hardware-aware configuration - automatic GPU/CPU selection
  • Example configurations for common scenarios

Quick Start with Configuration

# Use example configuration
ign-lidar-hd process --config examples/config_versailles_lod2_v5.0.yaml

# Or create custom config
cat > my_config.yaml << EOF
input_dir: /data/tiles
output_dir: /data/output
processor:
  use_feature_computer: true  # Automatic GPU/CPU selection
  lod_level: LOD2
EOF

ign-lidar-hd process --config my_config.yaml

Benefits

โœ… Simpler: Clear, self-documenting configuration structure โœ… Flexible: Easy to customize for your needs
โœ… Automated: Intelligent hardware detection and optimization โœ… Reproducible: Configuration files ensure consistent results โœ… Extensible: Easy to add new features and options

๐Ÿ“– See Configuration Guide for complete documentation


โœจ What's New in v3.0.0

๐ŸŽฏ Unified Configuration System

v3.0.0 introduces a completely redesigned configuration architecture!

  • Unified Schema: Single, coherent configuration system replacing fragmented v2.x/v3.0 configs
  • GPU Optimized: Default configurations deliver >80% GPU utilization (vs 17% in legacy)
  • Smart Presets: Ready-to-use configs for common scenarios
  • Hardware Profiles: Optimized settings for RTX 4080, RTX 3080, CPU fallback
  • Migration Tools: Automatic conversion from legacy configurations
# New simplified usage with presets
./scripts/run_processing.sh --preset gpu_optimized --input /data/tiles

# Hardware-specific optimization
./scripts/run_processing.sh --preset asprs_classification --hardware rtx4080

# Migration from legacy configs
python scripts/migrate_config_v4.py --input old_config.yaml --output new_config.yaml

Performance Improvements:

  • โšก 10-100ร— faster ground truth processing with forced GPU acceleration
  • ๐ŸŽฎ >80% GPU utilization (vs 17% with CPU fallback in legacy configs)
  • ๐Ÿ”ง <10 CLI parameters needed (vs 50+ in legacy scripts)
  • ๐Ÿ“ฆ 90 config files โ†’ 6 consolidated presets

๐Ÿ†• Optional Reclassification in Main Pipeline

v2.5.4 adds reclassification as an optional feature in the main processing pipeline!

You can now enable optimized ground truth reclassification directly in your processing config:

processor:
  reclassification:
    enabled: true # Optional - disabled by default
    acceleration_mode: "auto" # CPU, GPU, or GPU+cuML
    use_geometric_rules: true

Benefits:

  • โœ… Flexible: Enable/disable without separate runs
  • โœ… Fast: GPU-accelerated spatial indexing
  • โœ… Accurate: Ground truth from BD TOPOยฎ
  • โœ… Backward compatible: Existing configs work unchanged

๐Ÿ“– See docs/RECLASSIFICATION_INTEGRATION.md and docs/RECLASSIFICATION_QUICKSTART.md for details


โœจ What's New in v2.5.3

๐Ÿ”ง Critical Fix: Ground Truth Classification

v2.5.3 fixes critical issues with BD TOPOยฎ ground truth classification.

What Was Fixed

Ground truth classification from IGN BD TOPOยฎ wasn't working - no points were being classified to roads, cemeteries, power lines, etc.

Root Causes:

  • Incorrect class imports (MultiSourceDataFetcher โ†’ DataFetcher)
  • Missing BD TOPO feature parameters (cemeteries, power_lines, sports)
  • Missing buffer parameters (road_width_fallback, etc.)
  • Wrong method call (fetch_data() โ†’ fetch_all())

Impact: Ground truth now works correctly for all ASPRS codes:

  • โœ… ASPRS 11: Roads
  • โœ… ASPRS 40: Parking
  • โœ… ASPRS 41: Sports Facilities
  • โœ… ASPRS 42: Cemeteries
  • โœ… ASPRS 43: Power Lines

What Was Added

New BD TOPOยฎ Configuration Directory (ign_lidar/configs/data_sources/)

Pre-configured Hydra configs for different use cases:

  • default.yaml - General purpose with core features
  • asprs_full.yaml - Complete ASPRS classification
  • lod2_buildings.yaml - Building-focused for LOD2
  • lod3_architecture.yaml - Architectural focus for LOD3
  • disabled.yaml - Pure geometric features

Usage:

defaults:
  - data_sources: asprs_full # or lod2_buildings, lod3_architecture
  - _self_

๐Ÿ“– See ign_lidar/configs/data_sources/README.md for complete documentation


๐Ÿ“ฆ Previous Updates (v2.5.0-2.5.2)

v2.5.0 represented a complete internal modernization while maintaining 100% backward compatibility!

Unified Feature System โœจ

  • FeatureOrchestrator: New unified class replaces FeatureManager + FeatureComputer
  • Simpler API: One class handles all feature computation with automatic strategy selection
  • Better organized: Clear separation of concerns with strategy pattern
  • Fully compatible: All existing code works without changes

Improved Code Quality

  • 67% reduction in feature orchestration code complexity
  • Optimized error messages and validation throughout
  • Complete type hints for better IDE support
  • Modular architecture for easier maintenance and extension

Migration Made Easy

  • Zero breaking changes: Your v1.x code continues to work
  • Deprecation warnings: Clear guidance for future-proofing your code
  • Migration guide: Step-by-step instructions in MIGRATION_GUIDE.md
  • Backward compatible: Legacy APIs will be maintained through v2.x series
# NEW (v2.0) - Recommended unified API
from ign_lidar import LiDARProcessor

processor = LiDARProcessor(
    config_path="config.yaml",
    feature_mode="lod3"  # Clearer mode specification
)

# Access unified orchestrator
orchestrator = processor.feature_orchestrator
print(f"Feature mode: {orchestrator.mode}")
print(f"Has RGB: {orchestrator.has_rgb}")
print(f"Available features: {orchestrator.get_feature_list('lod3')}")

# OLD (v1.x) - Still works with deprecation warnings
# feature_manager = processor.feature_manager  # Deprecated but functional
# feature_computer = processor.feature_computer  # Deprecated but functional

Why upgrade?

  • Future-proof your code for v3.0
  • Access to new features and improvements
  • Better performance and error handling
  • Professional, maintainable codebase

๐Ÿ“– See MIGRATION_GUIDE.md for complete upgrade instructions
๐Ÿ“– Full Release History


๐Ÿš€ Quick Start

Installation

# Standard installation (CPU)
pip install ign-lidar-hd

# Optional: GPU acceleration (6-20x speedup)
# CRITICAL: Use ign_gpu conda environment for GPU operations
conda env create -f conda-recipe/environment_gpu.yml

โš ๏ธ GPU Users: Always run GPU operations with:

conda run -n ign_gpu python <script.py>

See GPU_QUICK_REFERENCE.md for details.

Zero-Config Quick Start (v5.5+)

The simplest way to get started - no configuration file needed!

# Download sample data
ign-lidar-hd download --bbox 2.3,48.8,2.4,48.9 --output data/ --max-tiles 5

# Process with automatic hardware detection (GPU or CPU)
ign-lidar-hd process input_dir=data/ output_dir=results/

# That's it! The system automatically:
# โœ… Detects GPU/CPU and optimizes accordingly
# โœ… Uses optimal settings for your hardware
# โœ… Selects appropriate feature set
# โœ… Configures memory and batch sizes

Configuration-Based Processing (v5.5+)

For advanced workflows, use the 3-tier configuration system (97% smaller configs!):

# Use hardware profile + task preset
ign-lidar-hd process \
  --config-name my_config \
  defaults=[hardware/gpu_rtx4080,task/asprs_classification]

# Or use one of our example configs
ign-lidar-hd process --config-path examples --config-name config_asprs_bdtopo_cadastre_gpu_v5.5

# List available profiles and presets
ign-lidar-hd list-profiles   # Shows: gpu_rtx4080, gpu_rtx3080, cpu_high, etc.
ign-lidar-hd list-presets    # Shows: asprs_classification, lod2_buildings, etc.

# Validate your configuration
ign-lidar-hd validate-config examples/my_config.yaml

Legacy CLI (v5.4 and earlier)

The traditional command-based CLI still works for backward compatibility:

# Enrich with features (GPU accelerated if available)
ign-lidar-hd enrich --input-dir data/ --output enriched/ --use-gpu

# Create training patches
ign-lidar-hd patch --input-dir enriched/ --output patches/ --lod-level LOD2

Python API

from ign_lidar import LiDARProcessor

# Option 1: Zero-config with automatic hardware detection
processor = LiDARProcessor()  # Uses intelligent defaults
patches = processor.process_tile("data.laz", "output/")

# Option 2: With configuration file (recommended for production)
processor = LiDARProcessor(config_path="examples/config_asprs_bdtopo_cadastre_gpu_v5.5.yaml")
patches = processor.process_directory("input_dir/", "output_dir/")

# Option 3: Traditional explicit parameters (legacy)
processor = LiDARProcessor(lod_level="LOD2", patch_size=150.0, use_gpu=True)
patches = processor.process_tile("data.laz", "output/")

โš™๏ธ Configuration System v5.5 (NEW!)

Zero-config by default, powerful when you need it!

Version 5.5 introduces a revolutionary 3-tier configuration architecture that reduces config complexity by 97% while adding powerful new capabilities:

๐ŸŽฏ Design Principles

  • Zero-config by default - Works out of the box with intelligent defaults
  • Progressive complexity - Add configuration only when you need it
  • Hardware-aware - Automatic GPU/CPU detection and optimization
  • Composable - Mix and match hardware profiles and task presets
  • Validated - Catch errors early with comprehensive validation

๐Ÿ“Š Before & After Comparison

# โŒ v5.4 Configuration (430 lines, manually specified everything)
input_dir: /data/tiles
output_dir: /data/output
preprocess:
  buffer_size: 50.0
  normalize_intensity: true
  handle_overlap: true
processor:
  use_gpu: true
  use_gpu_chunked: true
  gpu_batch_size: 5000000
  lod_level: LOD2
  num_neighbors: 30
  search_radius: 3.0
features:
  mode: lod2
  k_neighbors: 10
  compute_normals: true
  compute_curvature: true
  compute_eigenvalues: true
  # ... 400+ more lines ...

# โœ… v5.5 Configuration (15 lines, inherits intelligent defaults)
defaults:
  - hardware/gpu_rtx4080     # Hardware optimization
  - task/asprs_classification # Task-specific settings
  - _self_

input_dir: /data/tiles
output_dir: /data/output

# That's it! Everything else is inherited

Result: 97% size reduction (430 lines โ†’ 15 lines) while gaining more capabilities!

๐Ÿ—๏ธ 3-Tier Architecture

Layer 1: base_complete.yaml (430 lines)
    โ†“ [All defaults defined]
    โ”œโ”€ Layer 2: Hardware Profiles (30-50 lines each)
    โ”‚   โ”œโ”€ gpu_rtx4080.yaml     - RTX 4080: 16GB VRAM, 5M batch
    โ”‚   โ”œโ”€ gpu_rtx3080.yaml     - RTX 3080: 10GB VRAM, 3M batch
    โ”‚   โ”œโ”€ cpu_high.yaml        - 64GB RAM, 8 workers
    โ”‚   โ””โ”€ cpu_standard.yaml    - 32GB RAM, 4 workers
    โ”‚
    โ””โ”€ Layer 3: Task Presets (20-40 lines each)
        โ”œโ”€ asprs_classification.yaml  - Full ASPRS with BD TOPOยฎ
        โ”œโ”€ lod2_buildings.yaml        - Fast building classification
        โ”œโ”€ lod3_architecture.yaml     - Detailed architectural features
        โ””โ”€ quick_enrich.yaml          - Minimal features, maximum speed

How it works:

  1. base_complete.yaml - Complete default configuration (you never edit this)
  2. Hardware profiles - Override only hardware-specific settings (GPU/CPU, memory, workers)
  3. Task presets - Override only task-specific settings (features, classification, output)
  4. Your config - Override only project-specific settings (paths, tile list)

๐Ÿš€ Common Usage Patterns

Pattern 1: Zero-Config (Automatic Everything)

# Just specify input/output - everything else is automatic!
ign-lidar-hd process input_dir=data/ output_dir=results/

Pattern 2: Hardware Profile Only

# Optimize for your GPU
ign-lidar-hd process \
  defaults=[hardware/gpu_rtx4080] \
  input_dir=data/ \
  output_dir=results/

Pattern 3: Hardware + Task Preset

# Complete workflow with both optimizations
ign-lidar-hd process \
  defaults=[hardware/gpu_rtx4080,task/asprs_classification] \
  input_dir=data/ \
  output_dir=results/

Pattern 4: Custom Configuration File

# my_config.yaml (minimal!)
defaults:
  - hardware/gpu_rtx4080
  - task/lod2_buildings
  - _self_

input_dir: /data/versailles
output_dir: /data/results
processor:
  tile_list: ["tile_001", "tile_002"] # Only override what's different!
ign-lidar-hd process --config-name my_config

๐Ÿ” Configuration Discovery

New CLI commands help you explore available options:

# List available hardware profiles
ign-lidar-hd list-profiles
# Output:
#   gpu_rtx4080    - RTX 4080 optimized (16GB VRAM)
#   gpu_rtx3080    - RTX 3080 optimized (10GB VRAM)
#   cpu_high       - High-end CPU (64GB RAM, 8 workers)
#   cpu_standard   - Standard CPU (32GB RAM, 4 workers)

# List available task presets
ign-lidar-hd list-presets
# Output:
#   asprs_classification - Full ASPRS with BD TOPOยฎ ground truth
#   lod2_buildings       - Fast building classification (12 features)
#   lod3_architecture    - Detailed architectural features (38 features)
#   quick_enrich         - Minimal features for fast processing

# Show complete resolved configuration
ign-lidar-hd show-config --config-name my_config

# Validate configuration before running
ign-lidar-hd validate-config my_config.yaml
# Output: โœ“ Configuration validated successfully
#         - Processor settings: OK
#         - Feature configuration: OK
#         - Data sources: OK
#         - Output settings: OK

โœ… Configuration Validation

v5.5 includes comprehensive validation that catches errors before processing:

# Validate any configuration file
ign-lidar-hd validate-config examples/my_config.yaml

# Example validation output:
# โœ“ Configuration validated: examples/my_config.yaml
#
# Validation Results:
# โœ“ Processor configuration: OK
#   - LOD level: LOD2 (valid)
#   - GPU batch size: 5000000 (valid range)
#   - Num neighbors: 30 (valid range)
#
# โœ“ Feature configuration: OK
#   - Mode: lod2 (valid)
#   - K-neighbors: 10 (valid range)
#
# โœ“ Data sources: OK
#   - 3 sources configured
#
# โœ“ Output configuration: OK
#   - Format: npz (valid)

Validation checks:

  • โœ… Required sections present (processor, features, data_sources, output)
  • โœ… Required keys in each section
  • โœ… Enum values (LOD level, feature mode, output format, etc.)
  • โœ… Numeric ranges (batch size, k-neighbors, search radius, etc.)
  • โœ… GPU settings compatibility
  • โœ… Path validity and accessibility

Benefits:

  • ๐ŸŽฏ Catch errors early - Before long processing runs
  • ๐Ÿ’ก Helpful suggestions - "Did you mean 'LOD2'?" for typos
  • ๐Ÿ“Š Clear reporting - See exactly what's wrong and where
  • ๐Ÿ”ง Pre-flight checks - Validate before submitting to cluster

๐Ÿ“ฆ Available Profiles & Presets

Hardware Profiles (ign_lidar/configs/hardware/):

Profile VRAM/RAM Batch Size Workers Best For
gpu_rtx4080 16GB 5M points 8 High-end GPU processing
gpu_rtx3080 10GB 3M points 6 Mid-range GPU processing
cpu_high 64GB 2M points 8 Server without GPU
cpu_standard 32GB 1M points 4 Standard workstation

Task Presets (ign_lidar/configs/task/):

Preset Features Ground Truth Use Case
asprs_classification 38 features BD TOPOยฎ + Cadastre Complete ASPRS classification
lod2_buildings 12 features BD TOPO buildings Fast building detection
lod3_architecture 38 features BD TOPOยฎ full Detailed architectural analysis
quick_enrich 4 features None Minimal processing for testing

๐Ÿ”— Migration from v5.4

Good news: v5.4 configs still work! No breaking changes.

To upgrade to v5.5:

# Option 1: Keep using your old config (works unchanged)
ign-lidar-hd process --config-path . --config-name old_config_v5.4

# Option 2: Simplify to v5.5 style (recommended)
# See docs/MIGRATION_GUIDE_V5.5.md for detailed examples

Why upgrade?

  • โœ… 97% smaller configuration files
  • โœ… Automatic hardware optimization
  • โœ… Early error detection with validation
  • โœ… Easier to maintain and share
  • โœ… Access to hardware profiles and task presets

๐Ÿ“– See Migration Guide for step-by-step instructions


๐Ÿ“‹ Key Features

Core Processing

  • ๐ŸŽฏ Complete Feature Export - All 35-45 computed geometric features saved to disk (v2.4.2+)
  • ๐Ÿ—๏ธ Multi-level Classification - LOD2 (12 features), LOD3 (38 features), Full (43+ features) modes
  • ๐Ÿ“Š Rich Geometry - Normals, curvature, eigenvalues, shape descriptors, architectural features, building scores
  • ๐ŸŽจ Optional Augmentation - RGB from orthophotos, NIR, NDVI for vegetation analysis
  • โš™๏ธ Auto-parameters - Intelligent tile analysis for optimal settings
  • ๐Ÿ“ Feature Tracking - Metadata includes feature names and counts for reproducibility

Performance

  • ๐Ÿš€ GPU Acceleration - RAPIDS cuML support (6-20x faster)
  • โšก Parallel Processing - Multi-worker with automatic CPU detection
  • ๐Ÿง  Memory Optimized - Chunked processing, 50-60% reduction
  • ๐Ÿ’พ Smart Skip - Resume interrupted workflows automatically (~1800x faster)

Flexibility

  • ๐Ÿ“ Processing Modes - Three clear modes: patches only, both, or LAZ only
  • ๐Ÿ“‹ YAML Configs - Declarative workflows with example templates
  • ๐Ÿ“ฆ Multiple Formats - NPZ, HDF5, PyTorch, LAZ (single or multi-format)
  • ๐Ÿ”ง CLI & API - Command-line tool and Python library

๐Ÿ’ก Usage Examples

Mode 1: Create Training Patches (Default)

# Using example config
ign-lidar-hd process \
  --config-file examples/config_training_dataset.yaml \
  input_dir=data/raw \
  output_dir=data/patches

# Or with CLI parameters
ign-lidar-hd process \
  input_dir=data/raw \
  output_dir=data/patches \
  processor.processing_mode=patches_only

Mode 2: Both Patches & Enriched LAZ

ign-lidar-hd process \
  --config-file examples/config_complete.yaml \
  input_dir=data/raw \
  output_dir=data/both

Mode 3: LAZ Enrichment Only

ign-lidar-hd process \
  --config-file examples/config_quick_enrich.yaml \
  input_dir=data/raw \
  output_dir=data/enriched

โš ๏ธ Note on Enriched LAZ Files: When generating enriched LAZ tile files, geometric features (normals, curvature, planarity, etc.) may show artifacts at tile boundaries due to the nature of the source data. These artifacts are inherent to tile-based processing and do not appear in patch exports, which provide the best results for machine learning applications. For optimal quality, use patches_only or both modes.

GPU-Accelerated Processing

ign-lidar-hd process \
  --config-file examples/config_gpu_processing.yaml \
  input_dir=data/raw \
  output_dir=data/output

Preview Configuration

ign-lidar-hd process \
  --config-file examples/config_training_dataset.yaml \
  --show-config \
  input_dir=data/raw

Python API Examples

from ign_lidar import LiDARProcessor, IGNLiDARDownloader

# Download tiles
downloader = IGNLiDARDownloader("downloads/")
tiles = downloader.download_by_bbox(bbox=(2.3, 48.8, 2.4, 48.9), max_tiles=5)

# Process with custom config
processor = LiDARProcessor(
    lod_level="LOD3",
    patch_size=150.0,
    num_points=16384,
    use_gpu=True
)

# Single tile
patches = processor.process_tile("input.laz", "output/")

# Batch processing
patches = processor.process_directory("input_dir/", "output_dir/", num_workers=4)

# PyTorch integration
from torch.utils.data import DataLoader
dataset = LiDARPatchDataset("patches/")
dataloader = DataLoader(dataset, batch_size=32, shuffle=True)

๐ŸŽ“ Feature Modes

IGN LiDAR HD supports multiple feature computation modes optimized for different use cases:

Minimal Mode (4 features) - Ultra-Fast

Best for: Quick processing, classification updates, minimal computation

Features: normal_z, planarity, height_above_ground, density

Performance: โšกโšกโšกโšกโšก Fastest (~5s per 1M points)

LOD2 Mode (12 features) - Fast Training

Best for: Basic building classification, quick prototyping, baseline models

Features: XYZ (3), normal_z, planarity, linearity, height, verticality, RGB (3), NDVI

Performance: ~15s per 1M points (CPU), fast convergence

LOD3 Mode (37 features) - Detailed Modeling

Best for: Architectural modeling, fine structure detection, research

Features: Complete normals (3), eigenvalues (5), curvature (2), shape descriptors (6), height features (2), building scores (3), density features (4), architectural features (4), spectral (5)

Performance: ~45s per 1M points (CPU), best accuracy

Full Mode (37+ features) - Complete Feature Set

Best for: Research, feature analysis, maximum information extraction

All Features: All LOD3 features plus any additional computed features

Performance: ~50s per 1M points (CPU), complete geometric description

Usage:

features:
  mode: minimal # or lod2, lod3, full, custom
  k_neighbors: 10

Output Format:

  • NPZ/HDF5/PyTorch: Full feature matrix with all features
  • LAZ: All features as extra dimensions for GIS tools
  • Metadata: feature_names and num_features for tracking

๐Ÿ“– See Feature Modes Documentation for complete details.


๐Ÿ“ฆ Output Format

NPZ Structure

Each patch is saved as NPZ with:

{
    'points': np.ndarray,        # [N, 3] XYZ coordinates
    'normals': np.ndarray,       # [N, 3] surface normals
    'curvature': np.ndarray,     # [N] principal curvature
    'intensity': np.ndarray,     # [N] normalized intensity
    'planarity': np.ndarray,     # [N] planarity measure
    'verticality': np.ndarray,   # [N] verticality measure
    'density': np.ndarray,       # [N] local point density
    'labels': np.ndarray,        # [N] building class labels
    # Facultative features:
    'wall_score': np.ndarray,    # [N] wall likelihood (planarity * verticality)
    'roof_score': np.ndarray,    # [N] roof likelihood (planarity * horizontality)
    # Optional with augmentation:
    'red': np.ndarray,           # [N] RGB red
    'green': np.ndarray,         # [N] RGB green
    'blue': np.ndarray,          # [N] RGB blue
    'infrared': np.ndarray,      # [N] NIR values
}

Available Formats

  • NPZ - Default NumPy format (recommended for ML)
  • HDF5 - Hierarchical data format
  • PyTorch - .pt files for PyTorch
  • LAZ - Point cloud format for visualization (may show boundary artifacts in tile mode)
  • Multi-format - Save in multiple formats: hdf5,laz, npz,torch

๐Ÿ’ก Tip: For machine learning applications, NPZ/HDF5/PyTorch patch formats provide cleaner geometric features than enriched LAZ tiles.


๐Ÿ“š Documentation

๐Ÿ“– Documentation Hub

Complete Documentation Index - Central navigation for all documentation

Quick Links

Documentation by Category

User Guides (docs/guides/):

Configuration Examples (examples/):

Technical Documentation:

API References:


๐Ÿ› ๏ธ Development

# Clone and install in development mode
git clone https://github.com/sducournau/IGN_LIDAR_HD_DATASET
cd IGN_LIDAR_HD_DATASET
pip install -e ".[dev]"

# Run tests
pytest tests/

# Format code
black ign_lidar/

๐Ÿ“‹ Requirements

Core:

  • Python 3.8+
  • NumPy >= 1.21.0
  • laspy >= 2.3.0
  • scikit-learn >= 1.0.0

Optional GPU Acceleration:

  • CUDA >= 12.0
  • CuPy >= 12.0.0
  • RAPIDS cuML >= 24.10 (recommended)

๐Ÿ“„ License

MIT License - see LICENSE file for details.


๐Ÿค Support & Contributing


๐Ÿ“ Cite Me

If you use this library in your research or projects, please cite:

@software{ign_lidar_hd,
  author       = {Ducournau, Simon},
  title        = {IGN LiDAR HD Processing Library},
  year         = {2025},
  publisher    = {GitHub},
  url          = {https://github.com/sducournau/IGN_LIDAR_HD_DATASET},
  version      = {3.0.0}
}

Project maintained by: ImagoData


Made with โค๏ธ for the LiDAR and Machine Learning communities

โฌ† Back to top

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ign_lidar_hd-3.4.1.tar.gz (965.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ign_lidar_hd-3.4.1-py3-none-any.whl (914.1 kB view details)

Uploaded Python 3

File details

Details for the file ign_lidar_hd-3.4.1.tar.gz.

File metadata

  • Download URL: ign_lidar_hd-3.4.1.tar.gz
  • Upload date:
  • Size: 965.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for ign_lidar_hd-3.4.1.tar.gz
Algorithm Hash digest
SHA256 a3ad3c0559ecb794fe49989587e5f9011e42f3171259a00b447535b4854b7e99
MD5 fab873e400cffe463ccc9596186e5ad2
BLAKE2b-256 6e7c6b50a065e6cfd00e13ff375737079540371c0f4f9c5b0f1e77c27e82fab1

See more details on using hashes here.

File details

Details for the file ign_lidar_hd-3.4.1-py3-none-any.whl.

File metadata

  • Download URL: ign_lidar_hd-3.4.1-py3-none-any.whl
  • Upload date:
  • Size: 914.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for ign_lidar_hd-3.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 77348573fdc9eb0c887b640a0e0f183fc6cf6ba1bf51fe25882e62bcc815b2ae
MD5 d9a816ea599ddac346a53da648993e68
BLAKE2b-256 abff22dcbb9b657de4c9db420bf9f718c68ce7f67f380e64b770f306da2499c2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page