Skip to content

Commit 971a1fd

Browse files
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 <[email protected]>
1 parent 0979e42 commit 971a1fd

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

stages/splitmerge.py

+9-8
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,15 @@ def process(self, args, outputs):
2929
photos = reconstruction.photos
3030
outputs['large'] = False
3131

32-
should_split = len(photos) > args.split
33-
34-
if should_split:
35-
# check for availability of either image_groups.txt (split-merge) or geotagged photos
36-
image_groups_file = os.path.join(args.project_path, "image_groups.txt")
37-
if 'split_image_groups_is_set' in args:
38-
image_groups_file = os.path.abspath(args.split_image_groups)
39-
if io.file_exists(image_groups_file) or reconstruction.has_geotagged_photos():
32+
image_groups_file = os.path.join(args.project_path, "image_groups.txt")
33+
if 'split_image_groups_is_set' in args:
34+
image_groups_file = os.path.abspath(args.split_image_groups)
35+
36+
if io.file_exists(image_groups_file):
37+
outputs['large'] = True
38+
elif len(photos) > args.split:
39+
# check for availability of geotagged photos
40+
if reconstruction.has_geotagged_photos():
4041
outputs['large'] = True
4142
else:
4243
log.ODM_WARNING('Could not perform split-merge as GPS information in photos or image_groups.txt is missing.')

0 commit comments

Comments
 (0)