kopia lustrzana https://github.com/OpenDroneMap/ODM
Merge pull request #1521 from theoway/split-merge-warning
Added a warning before split-merge to ensure GPS/`image_groups.txt` info is present.pull/1524/head
commit
90a60cb58a
opendm
stages
|
@ -93,6 +93,13 @@ class ODM_Reconstruction(object):
|
|||
|
||||
def has_gcp(self):
|
||||
return self.is_georeferenced() and self.gcp is not None and self.gcp.exists()
|
||||
|
||||
def has_geotagged_photos(self):
|
||||
for photo in self.photos:
|
||||
if photo.latitude is None and photo.longitude is None:
|
||||
return False
|
||||
|
||||
return True
|
||||
|
||||
def georeference_with_gcp(self, gcp_file, output_coords_file, output_gcp_file, output_model_txt_geo, rerun=False):
|
||||
if not io.file_exists(output_coords_file) or not io.file_exists(output_gcp_file) or rerun:
|
||||
|
|
|
@ -27,7 +27,19 @@ class ODMSplitStage(types.ODM_Stage):
|
|||
reconstruction = outputs['reconstruction']
|
||||
photos = reconstruction.photos
|
||||
|
||||
outputs['large'] = len(photos) > args.split
|
||||
gps_info_available = False
|
||||
# check for availability of either image_groups.txt (split-merge) or geotagged photos
|
||||
image_groups_file = os.path.join(args.project_path, "image_groups.txt")
|
||||
if 'split_image_groups_is_set' in args:
|
||||
image_groups_file = os.path.abspath(args.split_image_groups)
|
||||
if io.file_exists(image_groups_file) or reconstruction.has_geotagged_photos():
|
||||
gps_info_available = True
|
||||
|
||||
should_split = len(photos) > args.split
|
||||
if should_split and not gps_info_available:
|
||||
log.ODM_WARNING('Could not perform split-merge as GPS information in photos or image_groups.txt is missing.')
|
||||
|
||||
outputs['large'] = should_split and gps_info_available
|
||||
|
||||
if outputs['large']:
|
||||
# If we have a cluster address, we'll use a distributed workflow
|
||||
|
|
Ładowanie…
Reference in New Issue