CLI Commands Reference
Complete reference for all command-line interface commands in the IGN LiDAR HD Processing Library.
Command Structureโ
All commands follow this structure:
ign-lidar-hd COMMAND [options]
# Or using the installed command (if in PATH)
ign-lidar-hd COMMAND [options]
Available Commandsโ
download
- Download LiDAR tiles from IGN serversenrich
- Add building features to LAZ filesverify
- Verify features in enriched LAZ filespatch
- Extract patches from enriched tiles (renamed fromprocess
)process
- โ ๏ธ Deprecated alias forpatch
pipeline
- Execute complete workflows from YAML configuration
downloadโ
Download LiDAR tiles for a specified area.
Syntaxโ
ign-lidar-hd download \
--bbox MIN_LON,MIN_LAT,MAX_LON,MAX_LAT \
--output OUTPUT_DIR \
[--max-tiles MAX_TILES] \
[--force]
Parametersโ
Parameter | Type | Required | Description |
---|---|---|---|
--bbox | float,float,float,float | Yes | Bounding box as min_lon,min_lat,max_lon,max_lat |
--output | string | Yes | Output directory for downloaded tiles |
--max-tiles | integer | No | Maximum number of tiles to download |
--force | flag | No | Force re-download existing tiles |
Examplesโ
# Download tiles for Paris center (up to 10 tiles)
ign-lidar-hd download \
--bbox 2.25,48.82,2.42,48.90 \
--output /data/raw_tiles/ \
--max-tiles 10
# Download all available tiles in area
ign-lidar-hd download \
--bbox 2.25,48.82,2.42,48.90 \
--output /data/raw_tiles/
# Force re-download existing tiles
ign-lidar-hd download \
--bbox 2.25,48.82,2.42,48.90 \
--output /data/raw_tiles/ \
--force
Outputโ
Downloads LAZ files named with IGN conventions:
raw_tiles/
โโโ LIDARHD_FXX_0123_4567_LA93_IGN69_2020.laz
โโโ LIDARHD_FXX_0124_4567_LA93_IGN69_2020.laz
โโโ ...
Notesโ
- Coordinates must be in WGS84 (longitude/latitude)
- Valid range for France: longitude 1-8ยฐ, latitude 42-51ยฐ
- Files are typically 200-300 MB each
- Smart skip detection avoids re-downloading existing files
enrichโ
Add building component features to LiDAR point clouds.
Syntaxโ
ign-lidar-hd enrich \
--input-dir INPUT_DIR \
--output OUTPUT_DIR \
--mode MODE \
[--num-workers WORKERS] \
[--force]
Parametersโ
Parameter | Type | Required | Description |
---|---|---|---|
--input-dir | string | Yes | Directory containing raw LAZ tiles |
--output | string | Yes | Output directory for enriched tiles |
--mode | string | Yes | Feature extraction mode: core or full |
--num-workers | integer | No | Number of parallel workers (default: 4) |
--force | flag | No | Force re-enrichment of existing files |
--preprocess | flag | No | ๐ Enable preprocessing for artifact mitigation |
--sor-k | integer | No | ๐ SOR: number of neighbors (default: 12) |
--sor-std | float | No | ๐ SOR: std multiplier (default: 2.0) |
--ror-radius | float | No | ๐ ROR: search radius in meters (default: 1.0) |
--ror-neighbors | integer | No | ๐ ROR: min neighbors required (default: 4) |
--voxel-size | float | No | ๐ Voxel downsampling size in meters (optional) |
Examplesโ
# Enrich tiles with all features
ign-lidar-hd enrich \
--input-dir /data/raw_tiles/ \
--output /data/enriched_tiles/ \
--mode full
# Use 8 parallel workers
ign-lidar-hd enrich \
--input-dir /data/raw_tiles/ \
--output /data/enriched_tiles/ \
--mode full \
--num-workers 8
# Force re-enrichment
ign-lidar-hd enrich \
--input-dir /data/raw_tiles/ \
--output /data/enriched_tiles/ \
--mode full \
--force
# ๐ With preprocessing (artifact mitigation)
ign-lidar-hd enrich \
--input-dir /data/raw_tiles/ \
--output /data/enriched_tiles/ \
--mode full \
--preprocess
# ๐ Conservative preprocessing (preserve detail)
ign-lidar-hd enrich \
--input-dir /data/raw_tiles/ \
--output /data/enriched_tiles/ \
--mode full \
--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 /data/raw_tiles/ \
--output /data/enriched_tiles/ \
--mode full \
--preprocess \
--sor-k 10 \
--sor-std 1.5 \
--ror-radius 0.8 \
--ror-neighbors 5 \
--voxel-size 0.3
Outputโ
Creates enriched LAZ files with additional point attributes:
enriched_tiles/
โโโ LIDARHD_FXX_0123_4567_LA93_IGN69_2020.laz # +30 geometric features
โโโ LIDARHD_FXX_0124_4567_LA93_IGN69_2020.laz
โโโ ...
Features Addedโ
The enrichment process adds 30+ geometric features per point:
- Normal vectors (nx, ny, nz)
- Curvature (mean, gaussian)
- Planarity and sphericity
- Verticality and eigenvalues
- Density measures
- Height statistics
- And more...
๐ Preprocessing for Artifact Mitigationโ
The --preprocess
flag enables point cloud preprocessing before feature computation to reduce LiDAR scan line artifacts and improve geometric feature quality.
Techniques Applied:
-
Statistical Outlier Removal (SOR)
- Removes points with abnormal distances to k-nearest neighbors
- Configurable with
--sor-k
(neighbors) and--sor-std
(threshold) - Eliminates measurement errors, atmospheric noise, birds
-
Radius Outlier Removal (ROR)
- Removes isolated points without sufficient neighbors in radius
- Configurable with
--ror-radius
(meters) and--ror-neighbors
(count) - Reduces scan line artifacts and edge noise
-
Voxel Downsampling (Optional)
- Homogenizes point density using voxel grid
- Enabled with
--voxel-size
parameter (e.g., 0.5 for 0.5m voxels) - Reduces memory usage and processing time
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)
Recommended Presets:
# Conservative (preserve maximum detail)
--preprocess --sor-k 15 --sor-std 3.0 --ror-radius 1.5 --ror-neighbors 3
# Standard (balanced quality/speed)
--preprocess --sor-k 12 --sor-std 2.0 --ror-radius 1.0 --ror-neighbors 4
# Aggressive (maximum artifact removal)
--preprocess --sor-k 10 --sor-std 1.5 --ror-radius 0.8 --ror-neighbors 5 --voxel-size 0.3
See the Preprocessing Guide for detailed information.
Notesโ
- Only
building
mode is currently supported - Processing time: ~2-5 minutes per tile (depends on point density)
- Processing time with preprocessing: +15-30% overhead
- Memory usage: ~2-4 GB per worker
- Smart skip detection avoids re-enriching existing files
verifyโ
Verify features in enriched LAZ files to ensure quality and correctness.
Syntaxโ
ign-lidar-hd verify \
--input INPUT_FILE \
[--show-samples] \
[--quiet]
# Or verify multiple files
ign-lidar-hd verify \
--input-dir INPUT_DIR \
[--max-files MAX_FILES] \
[--show-samples] \
[--quiet]
Parametersโ
Parameter | Type | Required | Description |
---|---|---|---|
--input | string | * | Single LAZ file to verify |
--input-dir | string | * | Directory of LAZ files to verify |
--max-files | integer | No | Maximum number of files to verify |
--show-samples | flag | No | Display sample points from each file |
--quiet | flag | No | Suppress detailed output, show only summary |
* Either --input
or --input-dir
must be specified
Examplesโ
# Verify a single file
ign-lidar-hd verify --input enriched/file.laz
# Verify all files in directory
ign-lidar-hd verify --input-dir enriched/
# Quick check with samples
ign-lidar-hd verify --input enriched/file.laz --show-samples
# Batch verification (first 10 files)
ign-lidar-hd verify --input-dir enriched/ --max-files 10
# Quiet mode (summary only)
ign-lidar-hd verify --input-dir enriched/ --quiet
What Gets Verifiedโ
The verify command checks:
- RGB Values
- Presence of red, green, blue channels
- Value ranges (0-255)
- Color diversity and anomaly detection
- NIR (Infrared) Values
- Presence of NIR channel
- Value distribution
- Default value detection
- Geometric Features
- Linearity, planarity, sphericity
- Anisotropy, roughness
- Value range validation [0, 1]
- Quality Checks
- Out-of-range value detection
- Missing feature warnings
- Statistical distributions
Outputโ
Detailed analysis per file:
================================================================================
Analyzing: LHD_FXX_0473_6916.laz
================================================================================
Total points: 6,579,534
1. RGB VALUES CHECK
--------------------------------------------------------------------------------
โ RGB channels present
Red: min= 64, max=255, mean=151.34, std= 39.22
...
โ RGB values look good
2. NIR (INFRARED) VALUES CHECK
--------------------------------------------------------------------------------
โ NIR channel present
Range: 1 - 253
...
3. LINEARITY CHECK
--------------------------------------------------------------------------------
โ Linearity present
Range: 0.000073 - 0.999326
โ Linearity values in valid range [0, 1]
...
Summary for multiple files:
================================================================================
VERIFICATION SUMMARY
================================================================================
Files verified: 10
Feature presence:
โ rgb : 10/10 files (100.0%)
โ nir : 10/10 files (100.0%)
โ linearity : 10/10 files (100.0%)
...
โ No warnings detected
================================================================================
Notesโ
- Use after enrichment to validate processing
- Helps debug RGB/NIR fetch issues
- Detects feature computation errors
- See CLI Reference - Verify for detailed documentation
patchโ
Extract machine learning patches from enriched tiles with optional RGB augmentation.
Syntaxโ
ign-lidar-hd patch \
--input INPUT_PATH \
--output OUTPUT_DIR \
--lod-level LOD_LEVEL \
[--patch-size PATCH_SIZE] \
[--num-workers WORKERS] \
[--include-rgb] \
[--rgb-cache-dir CACHE_DIR] \
[--force]
Parametersโ
Parameter | Type | Required | Description |
---|---|---|---|
--input | string | Yes | Path to enriched LAZ file or directory |
--output | string | Yes | Output directory for patches |
--lod-level | string | Yes | Classification level: LOD2 or LOD3 |
--patch-size | float | No | Patch size in meters (default: 10.0) |
--num-workers | integer | No | Number of parallel workers (default: 4) |
--include-rgb | flag | No | Add RGB colors from IGN orthophotos |
--rgb-cache-dir | string | No | Cache directory for orthophoto downloads |
--force | flag | No | Force reprocessing existing patches |
Examplesโ
# Create patches for LOD2 (geometry only)
ign-lidar-hd patch \
--input /data/enriched_tiles/tile.laz \
--output /data/patches/ \
--lod-level LOD2
# Create patches with RGB augmentation from IGN orthophotos
ign-lidar-hd patch \
--input /data/enriched_tiles/ \
--output /data/patches/ \
--lod-level LOD2 \
--include-rgb \
--rgb-cache-dir /data/cache/
# Process entire directory for LOD3 with RGB
ign-lidar-hd patch \
--input /data/enriched_tiles/ \
--output /data/patches/ \
--lod-level LOD3 \
--patch-size 15.0 \
--num-workers 6 \
--include-rgb
# Force reprocessing with RGB
ign-lidar-hd patch \
--input /data/enriched_tiles/ \
--output /data/patches/ \
--lod-level LOD2 \
--include-rgb \
--force
Outputโ
Creates NPZ patch files organized by source tile:
patches/
โโโ tile_0123_4567/
โ โโโ patch_0001.npz
โ โโโ patch_0002.npz
โ โโโ ...
โโโ tile_0124_4567/
โ โโโ patch_0001.npz
โ โโโ ...
Patch Contentsโ
Each NPZ file contains:
points
: Point coordinates (Nร3 array)features
: Geometric features (Nร30+ array)labels
: Building component labels (Nร1 array)rgb
: RGB colors (Nร3 array, normalized 0-1) - only if--include-rgb
is usedmetadata
: Patch information (dict)
RGB Augmentationโ
When using --include-rgb
, the library automatically:
- Fetches orthophotos from IGN BD ORTHOยฎ service (20cm resolution)
- Maps each 3D point to its corresponding 2D orthophoto pixel
- Extracts RGB colors and normalizes them to [0, 1] range
- Caches downloaded orthophotos for performance
Benefits:
- Multi-modal learning (geometry + photometry)
- Enhanced ML model accuracy
- Better visualization capabilities
- Automatic - no manual orthophoto downloads needed
Requirements:
pip install requests Pillow
See the RGB Augmentation Guide for detailed information.
Classification Levelsโ
LOD2 (15 classes): Basic building components
- Wall, Roof, Ground, Vegetation, Window, Door, etc.
LOD3 (30 classes): Detailed building components
- All LOD2 classes plus roof details, facade elements, etc.
Notesโ
- Patch size affects the number of points per patch
- Smaller patches = more patches, fewer points each
- Larger patches = fewer patches, more points each
- Processing time: ~1-3 minutes per tile (geometry only), ~2-5 minutes with RGB
- RGB augmentation adds ~196KB per patch (16384 points ร 3 ร 4 bytes)
- Smart skip detection avoids reprocessing existing patches
process (Deprecated)โ
The process
command has been renamed to patch
for clarity. While process
still works for backwards compatibility, it will be removed in a future major version. Please use patch
instead.
Migrationโ
Simply replace process
with patch
in your commands:
# Old (deprecated)
ign-lidar-hd process --input tiles/ --output patches/
# New (recommended)
ign-lidar-hd patch --input tiles/ --output patches/
All parameters and functionality remain identical. See the patch
command documentation above.
Global Optionsโ
Loggingโ
Control output verbosity:
# Default logging
ign-lidar-hd command [args]
# Verbose output (debug level)
ign-lidar-hd command [args] --verbose
# Quiet mode (errors only)
ign-lidar-hd command [args] --quiet
Helpโ
Get help for any command:
# General help
ign-lidar-hd --help
# Command-specific help
ign-lidar-hd download --help
ign-lidar-hd enrich --help
ign-lidar-hd process --help
Common Workflowsโ
Full Pipelineโ
Complete processing workflow:
# 1. Download
ign-lidar-hd download \
--bbox 2.25,48.82,2.42,48.90 \
--output raw_tiles/ \
--max-tiles 5
# 2. Enrich
ign-lidar-hd enrich \
--input-dir raw_tiles/ \
--output enriched_tiles/ \
--mode full \
--num-workers 4
# 3. Process
ign-lidar-hd process \
--input enriched_tiles/ \
--output patches/ \
--lod-level LOD2 \
--num-workers 4
Resume Interrupted Workโ
Thanks to smart skip detection, you can safely re-run commands:
# If download was interrupted, just re-run
ign-lidar-hd download --bbox ... --output raw_tiles/
# Will skip existing files and download only missing ones
# Same for processing
ign-lidar-hd process --input enriched/ --output patches/ --lod-level LOD2
# Will skip tiles that already have patches
Force Reprocessingโ
Override smart skip when needed:
# Force re-download
ign-lidar-hd download --bbox ... --output raw_tiles/ --force
# Force re-enrichment
ign-lidar-hd enrich --input-dir raw/ --output enriched/ --mode full --force
# Force reprocessing
ign-lidar-hd process --input enriched/ --output patches/ --lod-level LOD2 --force
Performance Tipsโ
Worker Configurationโ
Choose worker count based on your system:
# For 8-core CPU with 16GB RAM
--num-workers 4
# For 16-core CPU with 32GB RAM
--num-workers 8
# For systems with limited memory
--num-workers 2
Memory Managementโ
Monitor memory usage:
# Check memory during processing
htop
# If memory is limited, reduce workers
ign-lidar-hd process --input tiles/ --output patches/ --num-workers 1
See the Memory Optimization Guide for detailed strategies.
Troubleshootingโ
Command Not Foundโ
If ign-lidar-hd
doesn't work:
# Check if package is installed
pip list | grep ign-lidar
# Reinstall if needed
pip install -e .
# Try the installed command name
ign-lidar-hd --help
Permission Errorsโ
# Check directory permissions
ls -la /path/to/output/
# Create directories if needed
mkdir -p /path/to/output/
Network Issuesโ
# Test connectivity for downloads
ping geoservices.ign.fr
# Check firewall/proxy settings
curl -I https://geoservices.ign.fr/
Processing Errorsโ
# Verify LAZ file integrity
lasinfo tile.laz
# Check available disk space
df -h /path/to/output/
# Reduce workers if getting memory errors
--num-workers 1
See Alsoโ
- Basic Usage Guide - Step-by-step workflow tutorial
- Smart Skip Features - Automatic skip detection
- Memory Optimization - Performance tuning
- Python API Reference - Programmatic usage