From 6d37355d6b11f09f965c97d65f36a0e2544d217c Mon Sep 17 00:00:00 2001 From: Piero Toffanin Date: Tue, 30 May 2023 19:50:31 -0400 Subject: [PATCH] Yet tighter max tiles check --- opendm/dem/commands.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opendm/dem/commands.py b/opendm/dem/commands.py index 1870cf4c..56c65d9d 100755 --- a/opendm/dem/commands.py +++ b/opendm/dem/commands.py @@ -152,7 +152,7 @@ def create_dem(input_point_cloud, dem_type, output_type='max', radiuses=['0.56'] # Safety check if max_tiles is not None: - if len(tiles) > max_tiles and final_dem_pixels > get_total_memory(): + if len(tiles) > max_tiles and (final_dem_pixels * 4) > get_total_memory(): raise system.ExitException("Max tiles limit exceeded (%s). This is a strong indicator that the reconstruction failed and we would probably run out of memory trying to process this" % max_tiles) # Sort tiles by increasing radius