From bb3b85d3e4b045fff6b929833985d3c1eb0ca817 Mon Sep 17 00:00:00 2001 From: nchamo Date: Tue, 13 Aug 2019 14:04:38 -0300 Subject: [PATCH] Add force-gps flag Former-commit-id: f6199b44f4442be1aa778607e89b1cc5c06c50c4 --- docker.settings.yaml | 1 + opendm/config.py | 6 ++++++ opendm/osfm.py | 3 ++- settings.yaml | 1 + 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/docker.settings.yaml b/docker.settings.yaml index bb4fa5af..6b71cf03 100644 --- a/docker.settings.yaml +++ b/docker.settings.yaml @@ -61,3 +61,4 @@ project_path: '/' #DO NOT CHANGE THIS OR DOCKER WILL NOT WORK. It should be '/' #orthophoto_bigtiff: IF_SAFER # Options are [YES, NO, IF_NEEDED, IF_SAFER] #build_overviews: FALSE #pc-classify: none +#force_gps: False diff --git a/opendm/config.py b/opendm/config.py index 46995861..903f5139 100644 --- a/opendm/config.py +++ b/opendm/config.py @@ -574,6 +574,12 @@ def config(): 'Options: %(choices)s. Default: ' '%(default)s')) + parser.add_argument('--force-gps', + action='store_true', + default=False, + help=('Use images\' gps exif data for reconstruction, even if there are gcps present.' + 'This flag is useful if you have high precision gps measurements.')) + args = parser.parse_args() # check that the project path setting has been set properly diff --git a/opendm/osfm.py b/opendm/osfm.py index 456b4eb1..105e1220 100644 --- a/opendm/osfm.py +++ b/opendm/osfm.py @@ -133,7 +133,8 @@ class OSFMContext: if gcp_path: config.append("bundle_use_gcp: yes") - config.append("bundle_use_gps: no") + if not args.force_gps: + config.append("bundle_use_gps: no") io.copy(gcp_path, self.path("gcp_list.txt")) config = config + append_config diff --git a/settings.yaml b/settings.yaml index ca2e4bf1..cfc256e7 100644 --- a/settings.yaml +++ b/settings.yaml @@ -61,3 +61,4 @@ project_path: '' # Example: '/home/user/ODMProjects' #orthophoto_bigtiff: IF_SAFER # Options are [YES, NO, IF_NEEDED, IF_SAFER] #build_overviews: FALSE #pc-classify: none +#force_gps: False