Sol nu : ramener aussi les cellules sans mesure au retour le plus bas
This commit is contained in:
@ -803,7 +803,12 @@ def create_dtm_fast(las_file, basename, dtm_dir, resolution, force=False,
|
|||||||
if bare_earth and source_laz is not None:
|
if bare_earth and source_laz is not None:
|
||||||
min_grid = _min_return_grid(source_laz, width, height,
|
min_grid = _min_return_grid(source_laz, width, height,
|
||||||
(min_x, min_y, max_x, max_y))
|
(min_x, min_y, max_x, max_y))
|
||||||
lower = ~np.isnan(min_grid) & (min_grid < dtm)
|
# Cellules sans sol mesuré (NaN) : le retour le plus bas devient
|
||||||
|
# la mesure — sinon la comparaison NaN est fausse et la cellule
|
||||||
|
# retombe sur l'interpolation en fin de passe.
|
||||||
|
has_min = ~np.isnan(min_grid)
|
||||||
|
lower = has_min & (min_grid < dtm)
|
||||||
|
lower |= has_min & np.isnan(dtm)
|
||||||
dtm = np.where(lower, min_grid, dtm)
|
dtm = np.where(lower, min_grid, dtm)
|
||||||
logger.info(f" Sol nu : {int(lower.sum()):,} cellules raménées au retour le plus bas")
|
logger.info(f" Sol nu : {int(lower.sum()):,} cellules raménées au retour le plus bas")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user