Add LAZ integrity check to skip corrupted files early

Validate file readability before PDAL classification. Corrupted/truncated
files are detected instantly via laspy header read and skipped with a clear
error message pointing to re-download, instead of wasting time on PDAL
and repair attempts that will fail anyway.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Jacquin Antoine
2026-05-14 17:59:32 +02:00
parent f988ddb76d
commit 7ac08f75dc
2 changed files with 28 additions and 0 deletions

View File

@ -272,6 +272,11 @@ class LidarArchaeoPipeline:
logger.info(f"FICHIER : {basename}")
logger.info("=" * 60)
# Validate file integrity before any processing
from .dtm import validate_laz
if not validate_laz(laz_file):
return False
# Skip ground classification + DTM if DTM already exists with matching resolution
# --force only affects visualizations/PDF, not classification/DTM
# Use --force-classification to force reclassification