diff --git a/opendm/gcp.py b/opendm/gcp.py index 0b1f6ba9..841ce956 100644 --- a/opendm/gcp.py +++ b/opendm/gcp.py @@ -6,9 +6,6 @@ from pyproj import CRS class GCPFile: def __init__(self, gcp_path): - if not gcp_path: - raise RuntimeError("gcp_path must be specified") - self.gcp_path = gcp_path self.entries = [] self.raw_srs = "" diff --git a/opendm/types.py b/opendm/types.py index 60fe3e3d..0e26f324 100644 --- a/opendm/types.py +++ b/opendm/types.py @@ -147,6 +147,7 @@ class ODM_Reconstruction(object): except: log.ODM_WARNING('Could not generate coordinates file. An orthophoto will not be generated.') + self.gcp = GCPFile(None) return self.georef def save_proj_srs(self, file): diff --git a/tests/test_gcp.py b/tests/test_gcp.py index f55dcf0b..3c75c4a1 100644 --- a/tests/test_gcp.py +++ b/tests/test_gcp.py @@ -53,5 +53,9 @@ class TestGcp(unittest.TestCase): self.assertTrue(copy.exists()) self.assertEqual(copy.entries_count(), 1) + def test_null_gcp(self): + gcp = GCPFile(None) + self.assertFalse(gcp.exists()) + if __name__ == '__main__': unittest.main() \ No newline at end of file