Verify Command
The verify
command validates features in enriched LAZ files, checking RGB, NIR, and geometric features for correctness and anomalies.
Basic Usageβ
# Verify a single file
ign-lidar-hd verify --input enriched/file.laz
# Verify all files in a directory
ign-lidar-hd verify --input-dir enriched/
# Show sample points
ign-lidar-hd verify --input enriched/file.laz --show-samples
Command Optionsβ
Input Optionsβ
Option | Type | Description |
---|---|---|
--input | Path | Single LAZ file to verify |
--input-dir | Path | Directory containing LAZ files to verify |
info
Either --input
or --input-dir
must be specified, but not both.
Output Optionsβ
Option | Type | Default | Description |
---|---|---|---|
--quiet | Flag | False | Suppress detailed output, show only summary |
--show-samples | Flag | False | Display sample points from each file |
--max-files | Integer | None | Maximum number of files to verify |
What Gets Verifiedβ
RGB Valuesβ
- β Presence of red, green, blue channels
- β Value ranges (0-255 for 8-bit display)
- β Statistical analysis (min, max, mean, std)
- β Unique color combinations
- β οΈ Warns if too few unique values (fetch failure)
- β οΈ Warns if majority are default gray (128,128,128)
NIR (Infrared) Valuesβ
- β Presence of NIR channel
- β Value ranges and distribution
- β Unique value count
- β οΈ Warns if majority have default value (128)
Geometric Featuresβ
- β Linearity: shape elongation along principal axis [0-1]
- β Planarity: flatness of local neighborhood [0-1]
- β Sphericity: 3D compactness [0-1]
- β Anisotropy: degree of directional dependence [0-1]
- β Roughness: surface irregularity [0-1]
Quality Checksβ
- β Values within valid range [0, 1] for normalized features
- β Non-zero point counts
- β Statistical distributions
- β οΈ Out-of-range value detection
- β οΈ Missing feature warnings
Examplesβ
Basic Verificationβ
# Verify a single enriched file
ign-lidar-hd verify --input enriched/LHD_FXX_0473_6916.laz
Output:
================================================================================
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
Green: min= 76, max=255, mean=156.38, std= 27.50
Blue: min= 73, max=255, mean=147.91, std= 23.85
Unique RGB combinations: 81,840
β RGB values look good
2. NIR (INFRARED) VALUES CHECK
--------------------------------------------------------------------------------
β NIR channel present
Range: 1 - 253
Mean: 61.31, Std: 45.44
Unique NIR values: 248
Most common value: 23 (appears 2.16%)
β NIR values look good
3. LINEARITY CHECK
--------------------------------------------------------------------------------
β Linearity present
Range: 0.000073 - 0.999326
Mean: 0.611597, Std: 0.292987
Non-zero count: 6,579,534 (100.00%)
β Linearity values in valid range [0, 1]
4. OTHER GEOMETRIC FEATURES CHECK
--------------------------------------------------------------------------------
β planarity : min=0.0002, max=0.4997, mean=0.1899, non-zero=100.0%
β sphericity : min=0.0000, max=0.3001, mean=0.0029, non-zero=100.0%
β anisotropy : min=0.2203, max=1.0000, mean=0.9955, non-zero=100.0%
β roughness NOT present
================================================================================
Batch Verification with Samplesβ
# Verify first 5 files with sample display
ign-lidar-hd verify \
--input-dir enriched/ \
--max-files 5 \
--show-samples
Sample output includes random point examples:
5. SAMPLE POINTS
--------------------------------------------------------------------------------
Random sample of 10 points:
Point 2679693: RGB=(141,148,140) NIR= 33 L=0.9950 P=0.0024 S=0.0001
Point 2155237: RGB=(145,155,147) NIR= 33 L=0.9910 P=0.0042 S=0.0002
Point 5221160: RGB=(139,149,141) NIR= 31 L=0.3013 P=0.3489 S=0.0003
...
Quick Quality Checkβ
# Quick check of large dataset (first 10 files, summary only)
ign-lidar-hd verify \
--input-dir enriched/ \
--max-files 10 \
--quiet
Summary Output:
================================================================================
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%)
β planarity : 10/10 files (100.0%)
β sphericity : 10/10 files (100.0%)
β anisotropy : 10/10 files (100.0%)
β οΈ roughness : 0/10 files (0.0%)
β No warnings detected
================================================================================
Use Casesβ
After Enrichment Pipelineβ
# Verify enrichment was successful
ign-lidar-hd enrich --input-dir data/ --output enriched/
ign-lidar-hd verify --input-dir enriched/
Quality Assuranceβ
# Sample verification of large dataset
ign-lidar-hd verify --input-dir /data/tiles --max-files 20 --show-samples
Debugging Issuesβ
# Detailed analysis of problematic file
ign-lidar-hd verify --input ./problem_tile.laz --show-samples
Automated Testingβ
# Quick validation in CI/CD
ign-lidar-hd verify --input-dir ./test_output --max-files 5 --quiet
Python APIβ
You can also use verification programmatically:
from pathlib import Path
from ign_lidar.verifier import verify_laz_files, FeatureVerifier
# Simple verification
results = verify_laz_files(
input_path=Path("enriched/file.laz"),
verbose=True,
show_samples=True
)
# Batch verification
results = verify_laz_files(
input_dir=Path("enriched/"),
max_files=10,
verbose=True
)
# Custom verification with class
verifier = FeatureVerifier(verbose=True, show_samples=True)
result = verifier.verify_file(Path("enriched/file.laz"))
# Print summary
verifier.print_summary(results)
Common Warningsβ
RGB Warningsβ
- Very few unique RGB values β RGB fetch failed or no orthophoto available
- Majority gray (128,128,128) β Default values, RGB augmentation not applied
NIR Warningsβ
- Majority value is 128 β Default value, NIR augmentation not applied
Feature Warningsβ
- Values exceed 1.0 β Computation error, check feature calculation
- Values below 0.0 β Computation error, negative eigenvalues
- All zeros β Feature not computed or computation failed
Troubleshootingβ
Issue: RGB/NIR channels missingβ
Solution:
# Re-run enrichment with RGB/NIR augmentation
ign-lidar-hd enrich \
--input-dir data/ \
--output enriched/ \
--add-rgb --rgb-cache-dir cache/rgb \
--add-infrared --infrared-cache-dir cache/infrared
Issue: Geometric features missingβ
Solution:
# Re-run enrichment with full mode
ign-lidar-hd enrich \
--input-dir data/ \
--output enriched/ \
--mode full
Issue: Out-of-range feature valuesβ
This indicates a computation error. Check:
- Input data quality
- Neighborhood parameters (k_neighbors, radius)
- Point density (too sparse/dense)
Report the issue with sample data if problem persists.
See Alsoβ
- Enrich Command - Feature computation
- RGB Augmentation - Adding RGB colors
- Infrared Augmentation - Adding NIR values
- Pipeline Configuration - Automated workflows