Update logic to allow split default when path set (#1782)

* Update logic to allow split default when path set

* Fix default split-image-groups case

---------

Co-authored-by: Piero Toffanin <pt@masseranolabs.com>
pull/1783/head
Stephen Mather 2024-07-22 09:16:15 -04:00 zatwierdzone przez GitHub
rodzic 0979e42db3
commit 971a1fd29b
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
1 zmienionych plików z 8 dodań i 7 usunięć

Wyświetl plik

@ -29,14 +29,15 @@ class ODMSplitStage(types.ODM_Stage):
photos = reconstruction.photos
outputs['large'] = False
should_split = len(photos) > args.split
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 should_split:
# 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():
if io.file_exists(image_groups_file):
outputs['large'] = True
elif len(photos) > args.split:
# check for availability of geotagged photos
if reconstruction.has_geotagged_photos():
outputs['large'] = True
else:
log.ODM_WARNING('Could not perform split-merge as GPS information in photos or image_groups.txt is missing.')