Skip to main content

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​

OptionTypeDescription
--inputPathSingle LAZ file to verify
--input-dirPathDirectory containing LAZ files to verify
info

Either --input or --input-dir must be specified, but not both.

Output Options​

OptionTypeDefaultDescription
--quietFlagFalseSuppress detailed output, show only summary
--show-samplesFlagFalseDisplay sample points from each file
--max-filesIntegerNoneMaximum 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:

  1. Input data quality
  2. Neighborhood parameters (k_neighbors, radius)
  3. Point density (too sparse/dense)

Report the issue with sample data if problem persists.

See Also​