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 Tests Documentation

Version 1.7.4 | ๐Ÿ“š Documentation

LoD3 Building Model Icon

A comprehensive Python library for processing IGN (Institut National de l'Information Gรฉographique et Forestiรจre) LiDAR HD data into machine learning-ready datasets for Building Level of Detail (LOD) classification tasks.

โœจ What's New in v1.7.4

๐Ÿš€ GPU Acceleration - RAPIDS cuML support for 15-20x speedup, hybrid CuPy mode for 5-10x speedup
๐Ÿ“š Enhanced Documentation - Comprehensive GPU setup guides in English and French
๐Ÿ”ง Per-Chunk Optimization - Intelligent local KDTree strategy for optimal performance
โšก Three Performance Modes - CPU, Hybrid GPU (CuPy), Full GPU (RAPIDS cuML)
๐ŸŒ WSL2 Support - Complete installation guides for Windows Subsystem for Linux

๐Ÿ“– GPU Quick Start | ๐Ÿš€ GPU Documentation

Previous Updates (v1.7.3)

๐ŸŒฟ Infrared Augmentation - NEW! Add Near-Infrared (NIR) values from IGN IRC orthophotos
๐Ÿ“Š NDVI Ready - Enables vegetation index calculation and advanced land cover analysis
๐ŸŽจ Multi-Modal Enhancement - Combines RGB + NIR for improved machine learning datasets
๐Ÿ’พ Smart Caching - Efficient disk/GPU caching system shared with RGB augmentation
๐Ÿ”ง Seamless Integration - Works alongside RGB augmentation in enrich pipeline
๐Ÿš€ GPU Acceleration - RAPIDS cuML support for 15-20x speedup (5-10x with CuPy hybrid mode)

๐Ÿ“– Infrared Documentation | ๐Ÿš€ Infrared Quick Start | โšก GPU Quick Start

Previous Updates (v1.7.1)

๐Ÿค– Auto-Parameter Analysis - Automatic tile analysis determines optimal processing parameters
๐ŸŽฏ Adaptive Processing - Each tile gets custom radius, SOR, and ROR settings based on its characteristics
โšก Zero Manual Tuning - Eliminates guesswork, ensures best quality for urban/rural/mixed tiles
๐Ÿ“Š Smart Detection - Analyzes point density, spacing, and noise in <1 second per tile
๐Ÿ”ง CLI Integration - Simple --auto-params flag or YAML configuration

๐Ÿ“– Auto-Params Guide EN | ๐Ÿ“– Guide Auto-Params FR | ๐Ÿ“‹ Summary of Changes

Previous Updates (v1.7.0)

๐Ÿงน Artifact Mitigation Preprocessing - Statistical & radius outlier removal + voxel downsampling
๐ŸŽฏ 60-80% Scan Line Reduction - Dramatically improves geometric feature quality
โš™๏ธ Flexible Configuration - CLI flags or config files with sensible defaults
๐Ÿ”ง Production Ready - Fully integrated into enrich pipeline with comprehensive tests
๐Ÿ“Š Quality Metrics - Track preprocessing impact with detailed statistics

๐Ÿ“‹ Implementation Guide | ๐Ÿ”ง Integration Details | ๐Ÿ“Š Artifact Analysis

๐Ÿ“š Complete Release History: See our detailed release notes for full version history and migration guides.

Previous Updates (v1.6.4)

๐Ÿ“บ Enhanced Documentation - Updated README with embedded YouTube player for better video experience
๐ŸŽจ Improved Presentation - Better visual integration of demo content
๐Ÿ”ง Minor Updates - Documentation improvements and refinements

Previous Updates (v1.6.2)

๐Ÿ”ง Critical GPU Feature Fix - Corrected eigenvalue normalization in GPU implementation (now matches CPU)
๐Ÿ›ก๏ธ Robust Feature Computation - Added degenerate case filtering and outlier-resistant curvature
๐ŸŽฏ Enhanced Quality - Radius search support and comprehensive validation suite
โš ๏ธ Breaking Change: GPU feature values changed for users of GPU acceleration

๐Ÿ“– Analysis & Fixes | โœ… Implementation

Previous Updates (v1.6.0)

๐ŸŽฏ Enhanced Data Augmentation - Augmentation now happens during ENRICH phase (before feature computation) for better feature-geometry consistency
๐ŸŽจ RGB CloudCompare Fix - Perfect RGB color display with corrected 16-bit scaling
โšก 40% Processing Trade-off - Slightly longer processing time but significantly better training data quality
๐Ÿ“š Improved Documentation - Comprehensive guides and examples for all features

๐Ÿ“– Full Release Notes | ๐Ÿ”„ Migration Guide

๐Ÿ“บ Video Demo

IGN LiDAR HD Processing Demo

โ–ถ๏ธ Click to watch: Learn how to process LiDAR data for machine learning applications

๐Ÿ“Š Project Overview

This library transforms raw IGN LiDAR HD point clouds into structured datasets ready for machine learning applications. Built specifically for building classification tasks, it handles the complete pipeline from data acquisition to training-ready patches.

๐Ÿ”„ Processing Workflow

flowchart TD
    A[IGN LiDAR HD Data] --> B[Download Tiles]
    B --> C[Enrich with Features]
    C --> D[Create Training Patches]
    D --> E[ML-Ready Dataset]

    B --> B1[Smart Skip Detection]
    C --> C1[GPU/CPU Processing]
    C --> C2[Geometric Features]
    C --> C3[Data Augmentation]
    C --> C4[RGB + Infrared NIR]
    C --> C5[NDVI Calculation]
    D --> D1[LOD Classification]

    style A fill:#e1f5fe
    style E fill:#e8f5e8
    style B1 fill:#fff3e0
    style C1 fill:#fff3e0
    style C3 fill:#fff3e0
    style C4 fill:#c8e6c9
    style C5 fill:#c8e6c9

๐Ÿ“ˆ Project Stats:

  • ๐Ÿ—๏ธ 14 core modules - Comprehensive processing toolkit
  • ๐Ÿ“ 10 example scripts - From basic usage to advanced workflows
  • ๐Ÿงช Comprehensive test suite - Ensuring reliability and performance
  • ๐ŸŒ 50+ curated tiles - Covering diverse French territories
  • โšก GPU & CPU support - Flexible computation backends
  • ๐Ÿ”„ Smart resumability - Never reprocess existing data

๐Ÿš€ Quick Start

Installation

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

# Verify installation
ign-lidar-hd --version

๏ฟฝ GPU Acceleration (Optional): For 5-10x speedup, install with GPU support:

# Prerequisites: NVIDIA GPU, CUDA 12.0+, Miniconda/Anaconda
conda create -n ign_gpu python=3.12 -y
conda activate ign_gpu
conda install -c rapidsai -c conda-forge -c nvidia cuml=24.10 cupy -y
pip install ign-lidar-hd

๐Ÿ“š Installation Guides:

Basic Usage

from ign_lidar import LiDARProcessor

# Initialize processor
processor = LiDARProcessor(lod_level="LOD2")

# Process a single tile
patches = processor.process_tile("data.laz", "output/")

# Process multiple files
patches = processor.process_directory("data/", "output/", num_workers=4)

Command Line Interface

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

# Process LiDAR tiles (enriches with all features)
ign-lidar-hd enrich --input-dir data/ --output enriched/ --mode full

# ๐Ÿš€ GPU acceleration (5-10x faster with CuPy, 15-20x with RAPIDS cuML)
# Requires: NVIDIA GPU, CUDA 12.0+, CuPy (or RAPIDS cuML for maximum speed)
ign-lidar-hd enrich --input-dir data/ --output enriched/ --use-gpu

# Enrich with RGB augmentation from IGN orthophotos
ign-lidar-hd enrich --input-dir tiles/ --output enriched/ --add-rgb --rgb-cache-dir cache/

# ๐Ÿ†• v1.7.2: Enrich with infrared augmentation (NIR values)
ign-lidar-hd enrich --input-dir tiles/ --output enriched/ --add-infrared --infrared-cache-dir cache/

# ๐Ÿ†• v1.7.2: Enrich with both RGB and Infrared (multi-modal)
ign-lidar-hd enrich --input-dir tiles/ --output enriched/ --add-rgb --add-infrared \
  --rgb-cache-dir cache/rgb --infrared-cache-dir cache/infrared

# ๐Ÿ†• Enrich with preprocessing (artifact mitigation)
ign-lidar-hd enrich --input-dir tiles/ --output enriched/ --preprocess

# ๐Ÿ†• v1.7.2: Full-featured enrichment (recommended!)
# Analyzes each tile, adds RGB + Infrared, applies preprocessing
# Note: Data augmentation is DISABLED by default
ign-lidar-hd enrich --input-dir tiles/ --output enriched/ --auto-params --preprocess \
  --add-rgb --add-infrared --rgb-cache-dir cache/rgb --infrared-cache-dir cache/infrared

# Enable augmentation to create augmented versions (1 original + 3 augmented per tile)
ign-lidar-hd enrich --input-dir tiles/ --output enriched/ --augment

# Process specific tiles with auto-params
ign-lidar-hd enrich --input-dir tiles/ --output enriched/ --auto-params tile1.laz tile2.laz

# ๐Ÿ†• Enrich with custom preprocessing parameters
ign-lidar-hd enrich --input-dir tiles/ --output enriched/ \
  --preprocess --sor-k 15 --sor-std 2.5 --ror-radius 1.0 --voxel-size 0.5

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

# ๐Ÿ†• Run complete workflow with YAML configuration
ign-lidar-hd pipeline config.yaml

๐Ÿ†• Pipeline Configuration (Recommended)

Use YAML configuration files for reproducible workflows:

# Create example configuration
ign-lidar-hd pipeline my_config.yaml --create-example full

# Edit configuration (my_config.yaml)
# Then run complete pipeline
ign-lidar-hd pipeline my_config.yaml

Example YAML configuration:

global:
  num_workers: 4

download:
  bbox: "2.3, 48.8, 2.4, 48.9"
  output: "data/raw"
  max_tiles: 10

enrich:
  input_dir: "data/raw"
  output: "data/enriched"
  mode: "full"
  add_rgb: true
  rgb_cache_dir: "cache/orthophotos"
  use_gpu: true
  # ๐Ÿ†• v1.7.1: Automatic parameter analysis
  auto_params: true # Analyzes each tile for optimal settings
  # ๐Ÿ†• v1.7.0: Preprocessing for artifact mitigation
  preprocess: true
  sor_k: 12
  sor_std: 2.0
  ror_radius: 1.0
  ror_neighbors: 4

patch:
  input_dir: "data/enriched"
  output: "data/patches"
  lod_level: "LOD2"
  num_points: 16384

Benefits:

  • โœ… Reproducible - Version control your workflows
  • โœ… Declarative - Define what you want, not how
  • โœ… Flexible - Run only the stages you need
  • โœ… Shareable - Easy team collaboration

๐Ÿ“‹ Key Features

๐Ÿ—๏ธ Core Processing Capabilities

  • LiDAR-only processing: Pure geometric analysis without RGB dependencies
  • ๐Ÿ†• RGB & Infrared augmentation: Optional color and Near-Infrared (NIR) enrichment from IGN orthophotos (BD ORTHOยฎ RGB and IRC)
  • ๐Ÿ†• NDVI-ready datasets: Automatic vegetation index calculation from combined RGB + NIR data
  • Multi-level classification: Support for LOD2 (15 classes) and LOD3 (30+ classes)
  • Rich feature extraction: Surface normals, curvature, planarity, verticality, local density
  • Architectural style inference: Automatic building style classification
  • Patch-based processing: Configurable 150m ร— 150m patches with overlap control

โšก Performance & Optimization

  • GPU acceleration: CUDA-accelerated feature computation with automatic CPU fallback
  • Parallel processing: Multi-worker support with automatic CPU core detection
  • Memory optimization: Chunked processing for large datasets
  • Smart skip detection: โญ๏ธ Automatically skip existing files and resume interrupted workflows
  • Batch operations: Process hundreds of tiles efficiently
  • ๐Ÿ†• Improved augmentation: Features computed on augmented geometry for consistency (disabled by default, enable with --augment)

๐Ÿ”ง Workflow Automation

  • Pipeline configuration: ๐Ÿ†• YAML-based declarative workflows for reproducibility
  • Integrated downloader: IGN WFS tile discovery and batch downloading
  • Format flexibility: Choose between LAZ 1.4 (full features) or QGIS-compatible output
  • ๐Ÿ†• Enhanced augmentation: Geometric transformations applied before feature computation for better data quality
  • Unified CLI: Single ign-lidar-hd command with intuitive subcommands
  • Idempotent operations: Safe to restart - never reprocesses existing data

๐ŸŒ Geographic Intelligence

  • Strategic locations: Pre-configured urban, coastal, and rural area processing
  • Bounding box filtering: Spatial subsetting for targeted analysis
  • Coordinate system handling: Automatic Lambert93 to WGS84 transformations
  • Tile management: Curated collection of 50+ test tiles across France

๐Ÿ—๏ธ Library Architecture

๐ŸŽฏ Component Architecture

graph TB
    subgraph "Core Processing"
        P[processor.py<br/>๐Ÿ”ง Main Engine]
        F[features.py<br/>โšก Feature Extraction]
        GPU[features_gpu.py<br/>๐Ÿ–ฅ๏ธ GPU Acceleration]
    end

    subgraph "Data Management"
        D[downloader.py<br/>๐Ÿ“ฅ IGN WFS Integration]
        TL[tile_list.py<br/>๐Ÿ“‚ Tile Management]
        SL[strategic_locations.py<br/>๏ฟฝ๏ธ Geographic Zones]
        MD[metadata.py<br/>๐Ÿ“Š Dataset Metadata]
    end

    subgraph "Classification & Styles"
        C[classes.py<br/>๐Ÿข LOD2/LOD3 Schemas]
        AS[architectural_styles.py<br/>๐ŸŽจ Style Inference]
    end

    subgraph "Integration & Config"
        CLI[cli.py<br/>๐Ÿ–ฑ๏ธ Command Interface]
        CFG[config.py<br/>โš™๏ธ Configuration]
        QGIS[qgis_converter.py<br/>๐Ÿ”„ QGIS Compatibility]
        U[utils.py<br/>๐Ÿ› ๏ธ Core Utilities]
    end

    CLI --> P
    CLI --> D
    P --> F
    P --> GPU
    P --> C
    F --> AS
    D --> TL
    D --> SL
    P --> MD

    style P fill:#e3f2fd
    style F fill:#e8f5e8
    style D fill:#fff3e0
    style CLI fill:#f3e5f5

๐Ÿ“‹ Module Responsibilities

Module Purpose Key Features
๐Ÿ”ง processor.py Main processing engine Patch creation, LOD classification, workflow orchestration
๐Ÿ“ฅ downloader.py IGN WFS integration Tile discovery, batch download, smart skip detection
โšก features.py Feature extraction Normals, curvature, geometric properties
๏ฟฝ๏ธ features_gpu.py GPU acceleration CUDA-optimized feature computation
๐Ÿข classes.py Classification schemas LOD2/LOD3 building taxonomies
๐ŸŽจ architectural_styles.py Style inference Building architecture classification

๐Ÿ”„ Example Workflows

examples/
โ”œโ”€โ”€ ๐Ÿš€ basic_usage.py           # Getting started
โ”œโ”€โ”€ ๐Ÿ™๏ธ example_urban_simple.py  # Urban processing
โ”œโ”€โ”€ โšก parallel_processing_example.py # Performance
โ”œโ”€โ”€ ๐Ÿ”„ full_workflow_example.py # End-to-end pipeline
โ”œโ”€โ”€ ๐ŸŽจ multistyle_processing.py # Architecture analysis
โ”œโ”€โ”€ ๐Ÿง  pytorch_dataloader.py    # ML integration
โ”œโ”€โ”€ ๐Ÿ†• pipeline_example.py      # YAML pipeline usage
โ”œโ”€โ”€ ๐Ÿ†• enrich_with_rgb.py       # RGB augmentation
โ”œโ”€โ”€ ๐Ÿ†• demo_infrared_augmentation.py  # Infrared augmentation
โ””โ”€โ”€ workflows/               # Production pipelines

config_examples/
โ”œโ”€โ”€ ๐Ÿ†• pipeline_full.yaml       # Complete workflow
โ”œโ”€โ”€ ๐Ÿ†• pipeline_enrich.yaml     # Enrich-only
โ””โ”€โ”€ ๐Ÿ†• pipeline_patch.yaml      # Patch-only

โš™๏ธ CLI Commands

The package provides a unified ign-lidar-hd command with four subcommands:

๐Ÿ”— CLI Workflow Chain

sequenceDiagram
    participant User
    participant CLI as ign-lidar-hd
    participant D as Downloader
    participant E as Enricher
    participant P as Processor

    User->>CLI: download --bbox ...
    CLI->>D: Initialize downloader
    D->>D: Fetch available tiles
    D->>D: Smart skip check
    D-->>CLI: Downloaded tiles
    CLI-->>User: โœ“ Tiles ready

    User->>CLI: enrich --input-dir ...
    CLI->>E: Initialize enricher
    E->>E: Compute geometric features
    E->>E: Optional RGB augmentation
    E->>E: GPU/CPU processing
    E-->>CLI: Enriched LAZ files
    CLI-->>User: โœ“ Features computed

    User->>CLI: patch --input-dir ...
    CLI->>P: Initialize processor
    P->>P: Create training patches
    P->>P: Apply augmentations
    P-->>CLI: ML-ready dataset
    CLI-->>User: โœ“ Dataset ready

    Note over User,CLI: ๐Ÿ†• Or use pipeline command
    User->>CLI: pipeline config.yaml
    CLI->>CLI: Load YAML config
    CLI->>D: Execute download stage
    CLI->>E: Execute enrich stage
    CLI->>P: Execute patch stage
    CLI-->>User: โœ“ Complete workflow

๐Ÿ†• Pipeline Command (Recommended)

Execute complete workflows using YAML configuration:

# Create example configuration
ign-lidar-hd pipeline my_config.yaml --create-example full

# Run configured pipeline
ign-lidar-hd pipeline my_config.yaml

See Pipeline Configuration Guide for detailed examples.

Download Command

Download LiDAR tiles from IGN:

ign-lidar-hd download \
  --bbox lon_min,lat_min,lon_max,lat_max \
  --output tiles/ \
  --max-tiles 50

Enrich Command

Enrich LAZ files with geometric features and optional RGB:

# CPU version (automatically skips existing enriched files)
ign-lidar-hd enrich \
  --input-dir tiles/ \
  --output enriched/ \
  --num-workers 4 \
  --k-neighbors 10

# ๐Ÿ†• With radius parameter (eliminates LIDAR scan artefacts)
ign-lidar-hd enrich \
  --input-dir tiles/ \
  --output enriched/ \
  --mode full \
  --radius 1.5  # Manual radius in meters (or omit for auto-estimate)

# ๐Ÿ†• With RGB augmentation from IGN orthophotos
ign-lidar-hd enrich \
  --input-dir tiles/ \
  --output enriched/ \
  --add-rgb \
  --rgb-cache-dir cache/orthophotos

# Force re-enrichment (ignore existing files)
ign-lidar-hd enrich \
  --input-dir tiles/ \
  --output enriched/ \
  --force

# GPU version (requires CUDA)
ign-lidar-hd enrich \
  --input-dir tiles/ \
  --output enriched/ \
  --use-gpu

๐Ÿ†• Preprocessing for Artifact Mitigation

Reduce LiDAR scan line artifacts and improve feature quality:

# Enable preprocessing with default settings
ign-lidar-hd enrich \
  --input-dir tiles/ \
  --output enriched/ \
  --preprocess

# Conservative preprocessing (preserve maximum detail)
ign-lidar-hd enrich \
  --input-dir tiles/ \
  --output enriched/ \
  --preprocess \
  --sor-k 15 \
  --sor-std 3.0 \
  --ror-radius 1.5 \
  --ror-neighbors 3

# Aggressive preprocessing (maximum artifact removal)
ign-lidar-hd enrich \
  --input-dir tiles/ \
  --output enriched/ \
  --preprocess \
  --sor-k 10 \
  --sor-std 1.5 \
  --ror-radius 0.8 \
  --ror-neighbors 5 \
  --voxel-size 0.3

# Full mode with preprocessing and RGB
ign-lidar-hd enrich \
  --input-dir tiles/ \
  --output enriched/ \
  --mode full \
  --preprocess \
  --add-rgb \
  --num-workers 2

Preprocessing Techniques:

  • Statistical Outlier Removal (SOR): Removes outliers based on distance to k-nearest neighbors

    • --sor-k: Number of neighbors (default: 12)
    • --sor-std: Std deviation multiplier (default: 2.0)
  • Radius Outlier Removal (ROR): Removes isolated points without sufficient neighbors

    • --ror-radius: Search radius in meters (default: 1.0)
    • --ror-neighbors: Minimum neighbors required (default: 4)
  • Voxel Downsampling: Homogenizes point density (optional)

    • --voxel-size: Voxel size in meters (e.g., 0.5)

Expected Impact:

  • ๐ŸŽฏ 60-80% reduction in scan line artifacts
  • ๐Ÿ“Š 40-60% cleaner surface normals
  • ๐Ÿ”ง 30-50% smoother edge features
  • โšก 15-30% processing overhead (when enabled)

๐Ÿ’ก Smart Skip: By default, the enrich command skips files that have already been enriched, making it safe to resume interrupted operations.

๐ŸŽฏ Artefact-Free Features: Use --radius parameter for scientifically accurate geometric features. Auto-estimation (default) eliminates LIDAR scan line artefacts. See Radius Parameter Guide for details.

๐Ÿงน NEW! Preprocessing: The --preprocess flag enables artifact mitigation through statistical outlier removal, radius outlier removal, and optional voxel downsampling. See Preprocessing Guide for details.

Patch Command

Create training patches from enriched LAZ files:

# Automatically skips tiles with existing patches
ign-lidar-hd patch \
  --input-dir enriched/ \
  --output patches/ \
  --lod-level LOD2 \
  --patch-size 150.0 \
  --num-workers 4 \
  --num-augmentations 3

# Force reprocessing (ignore existing patches)
ign-lidar-hd patch \
  --input-dir enriched/ \
  --output patches/ \
  --force

๐Ÿ’ก Smart Skip: The patch command automatically detects existing patches and skips reprocessing, allowing you to resume interrupted batch jobs.

๐Ÿ”ง Configuration

LOD Levels

  • LOD2: Simplified building models (15 classes)
  • LOD3: Detailed building models (30 classes)

Processing Options

processor = LiDARProcessor(
    lod_level="LOD2",           # LOD2 or LOD3
    patch_size=150.0,          # Patch size in meters
    patch_overlap=0.1,         # 10% overlap
    bbox=[xmin, ymin, xmax, ymax]  # Spatial filter
)

๐Ÿ†• v1.6.0: Data augmentation now happens during the ENRICH phase (before feature computation) instead of the PATCH phase. This ensures geometric features (normals, curvature, planarity) are computed on augmented geometry for better feature-geometry consistency and improved model training quality. Augmentation is DISABLED by default - use --augment to enable it. Each tile produces 1 original + 3 augmented versions (configurable with --num-augmentations). See AUGMENTATION_IMPROVEMENT.md for details.

๐Ÿ“Š Output Format

๐Ÿ“ Data Structure Overview

graph TB
    subgraph "Raw Input"
        LAZ[LAZ Point Cloud<br/>XYZ + Intensity<br/>Classification]
    end

    subgraph "Enriched Data"
        ELAZ[Enhanced LAZ<br/>+ 30 Features<br/>+ Building Labels]
    end

    subgraph "ML Dataset"
        NPZ[NPZ Patches<br/>16K points each<br/>Ready for Training]
    end

    subgraph "NPZ Contents"
        COORD[Coordinates<br/>X, Y, Z]
        GEOM[Geometric Features<br/>Normals, Curvature]
        SEMANTIC[Semantic Features<br/>Planarity, Verticality]
        META[Metadata<br/>Intensity, Return#]
        LABELS[Building Labels<br/>LOD2/LOD3 Classes]
    end

    LAZ --> ELAZ
    ELAZ --> NPZ
    NPZ --> COORD
    NPZ --> GEOM
    NPZ --> SEMANTIC
    NPZ --> META
    NPZ --> LABELS

    style LAZ fill:#ffebee
    style ELAZ fill:#e3f2fd
    style NPZ fill:#e8f5e8

๐Ÿ”ข NPZ File Structure

Each patch is saved as an NPZ file containing:

{
    '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
    'return_number': np.ndarray,   # [N] return number
    'height': np.ndarray,          # [N] height above ground
    'planarity': np.ndarray,       # [N] planarity measure
    'verticality': np.ndarray,     # [N] verticality measure
    'horizontality': np.ndarray,   # [N] horizontality measure
    'density': np.ndarray,         # [N] local point density
    'labels': np.ndarray,          # [N] building class labels
}

๐Ÿ“ Data Dimensions

Component Shape Data Type Description
points [N, 3] float32 3D coordinates (X, Y, Z)
normals [N, 3] float32 Surface normal vectors
features [N, 27] float32 Geometric feature matrix
labels [N] uint8 Building component classes
metadata [4] object Patch info (bbox, tile_id)

๐Ÿ“ฆ Typical patch: 16,384 points, ~2.5MB compressed, ~8MB in memory

๐ŸŒ Batch Download

from ign_lidar import IGNLiDARDownloader

# Initialize downloader
downloader = IGNLiDARDownloader("downloads/")

# Download tiles by bounding box (WGS84)
tiles = downloader.download_by_bbox(
    bbox=(-2.0, 47.0, -1.0, 48.0),  # West France
    max_tiles=10
)

# Download specific tiles
tile_names = ["LHD_FXX_0186_6834_PTS_C_LAMB93_IGN69"]
downloader.download_tiles(tile_names)

๐Ÿ“ Examples

Urban Processing

# High-detail urban processing
processor = LiDARProcessor(lod_level="LOD3", num_augmentations=5)
patches = processor.process_tile("urban_area.laz", "output/urban/")

Rural Processing

# Simplified rural processing
processor = LiDARProcessor(lod_level="LOD2", num_augmentations=2)
patches = processor.process_tile("rural_area.laz", "output/rural/")

Batch Processing

from ign_lidar import WORKING_TILES, get_tiles_by_environment

# Get coastal tiles
coastal_tiles = get_tiles_by_environment("coastal")

# Process all coastal areas
for tile_info in coastal_tiles:
    patches = processor.process_tile(
        f"data/{tile_info['tile_name']}.laz",
        f"output/coastal/{tile_info['tile_name']}/"
    )

๐Ÿ› ๏ธ Development

Setup Development Environment

git clone https://github.com/your-username/ign-lidar-hd-downloader
cd ign-lidar-hd-downloader
pip install -e ".[dev]"

Run Tests

pytest tests/

Code Formatting

black ign_lidar/
flake8 ign_lidar/

๐Ÿ“š Documentation & Resources

๐Ÿ“– Complete Documentation Hub

For comprehensive documentation, see the Documentation Hub:

๐Ÿš€ Essential Quick Links

๐Ÿ’ก Examples & Workflows

๐Ÿš€ Coming Soon: Interactive Documentation

We're working on a comprehensive Docusaurus documentation site that will include:

  • ๐ŸŒ Multi-language support (English & French)
  • ๐Ÿ” Full-text search
  • ๐Ÿ“ฑ Mobile-responsive design
  • ๐Ÿ“– Interactive tutorials
  • ๐Ÿ”— Auto-generated API reference
  • ๐Ÿ’ก Live code examples

See the Docusaurus Plan for details.

๐Ÿ“š API Reference

Core Classes

  • LiDARProcessor: Main processing engine
  • IGNLiDARDownloader: Batch download functionality
  • LOD2_CLASSES, LOD3_CLASSES: Classification taxonomies

Utility Functions

  • compute_normals(): Surface normal computation
  • compute_curvature(): Principal curvature calculation
  • extract_geometric_features(): Comprehensive feature extraction
  • get_tiles_by_environment(): Filter tiles by environment type

๐Ÿ”— Requirements

  • Python 3.8+
  • NumPy >= 1.21.0
  • laspy >= 2.3.0
  • scikit-learn >= 1.0.0
  • tqdm >= 4.60.0
  • requests >= 2.25.0
  • PyYAML >= 6.0 (for pipeline configuration)
  • Pillow >= 9.0.0 (for RGB augmentation)

๐Ÿ“„ License

MIT License - see LICENSE file for details.

๐Ÿค Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

๐Ÿ“ง Support

For issues and questions, please use the GitHub Issues page.

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-1.7.4.tar.gz (1.4 MB 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-1.7.4-py3-none-any.whl (1.9 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ign_lidar_hd-1.7.4.tar.gz
  • Upload date:
  • Size: 1.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for ign_lidar_hd-1.7.4.tar.gz
Algorithm Hash digest
SHA256 5f4f9f49015d4c663e646cbb0936497b36d771d398939b0f02f71ac1d35b6045
MD5 c687e647146aeb27f86b5c6c236ef7f5
BLAKE2b-256 91a7da45ab4162a49400ca17686045757355ea3a925c86cb47510f4c81a0f0fc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ign_lidar_hd-1.7.4-py3-none-any.whl
  • Upload date:
  • Size: 1.9 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for ign_lidar_hd-1.7.4-py3-none-any.whl
Algorithm Hash digest
SHA256 256457fe64693a82784c56b6500328002cc21912884eaab09ced32e79448a94b
MD5 ba20d6115896f25dc12cb4dabe7fc900
BLAKE2b-256 7bdb4b90edcc82a7441080388c95271db9432c2f35076029ba71af2bb75640c4

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