diff --git a/stages/odm_georeferencing.py b/stages/odm_georeferencing.py index 003d9ba73..24797d260 100644 --- a/stages/odm_georeferencing.py +++ b/stages/odm_georeferencing.py @@ -15,6 +15,7 @@ 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,16 +126,15 @@ 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'] / 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) + 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) else: log.ODM_INFO("Using default las scale of 0.001")