Skip to content

Commit

Permalink
fix variable name issue
Browse files Browse the repository at this point in the history
  • Loading branch information
smathermather committed Aug 8, 2024
1 parent 0b0aa88 commit c25fa51
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions stages/odm_georeferencing.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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")

Expand Down

0 comments on commit c25fa51

Please sign in to comment.