Skip ground classification when DTM already exists

If the DTM .tif exists and --force is not set, skip both ground
classification and DTM generation entirely. Previously, the pipeline
would spend 3+ minutes reclassifying ground even when the DTM was
already present and would be reused anyway.

Also includes: SharedDEM cache, enhanced WebP cartouche (compass rose,
adaptive scale bar, enriched info bar), removed COG/viewer, UTF-8
fix for parallel workers, skip logic for DTM and PDF.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Jacquin Antoine
2026-05-13 23:41:21 +02:00
parent f01683819c
commit 5b74322077
9 changed files with 564 additions and 942 deletions

View File

@ -250,7 +250,7 @@ def classify_ground(laz_file, temp_dir, method='auto', force=False):
return None
def create_dtm_fast(las_file, basename, dtm_dir, resolution):
def create_dtm_fast(las_file, basename, dtm_dir, resolution, force=False):
"""Create DTM using fast binning method with gap filling.
Args:
@ -258,10 +258,17 @@ def create_dtm_fast(las_file, basename, dtm_dir, resolution):
basename: Base name for output file.
dtm_dir: Directory for output DTM GeoTIFF.
resolution: Grid resolution in meters per pixel.
force: If True, regenerate even if DTM already exists.
Returns:
Path to output DTM GeoTIFF, or None on failure.
"""
output_tif = dtm_dir / f"{basename}_dtm.tif"
if output_tif.exists() and not force:
logger.info(f" DTM déjà existant — fichier réutilisé: {output_tif.name}")
return output_tif
import laspy
logger.info(" → Génération DTM...")