diff --git a/stages/odm_georeferencing.py b/stages/odm_georeferencing.py index 443b4dd01..c4ebd8f88 100644 --- a/stages/odm_georeferencing.py +++ b/stages/odm_georeferencing.py @@ -14,7 +14,6 @@ from opendm import system from opendm import context from opendm import location -from opendm import types from opendm.cropper import Cropper from opendm import point_cloud from opendm.multispectral import get_primary_band_name @@ -125,15 +124,16 @@ def process(self, args, outputs): stages.append("transformation") utmoffset = reconstruction.georef.utm_offset() + # Establish appropriate las scale for export las_scale = 0.001 filtered_point_cloud_stats = tree.path("odm_filterpoints", "point_cloud_stats.json") if os.path.isfile(filtered_point_cloud_stats): with open(filtered_point_cloud_stats, 'r') as stats: las_stats = json.load(stats) - spacing = las_stats['spacing'] / 100 - log.ODM_INFO("las scale calculated as the minimum of 1/10 estimated spacing or 0.001, which ever is less." % spacing) - las_scale = min(spacing, 0.001) + spacing = las_stats['spacing'] / 10 + log.ODM_INFO("Using 1/10 estimated spacing or 0.001 for las scale, which ever is less: %s" % spacing) + log_scale = min(spacing, las_scale) else: log.ODM_INFO("Using default las scale of 0.001")