Fixed GCP initialization

Former-commit-id: 84d7994f3d
pull/1161/head
Piero Toffanin 2019-06-21 15:33:10 -04:00
rodzic eedf0e62ab
commit 958b78e240
3 zmienionych plików z 5 dodań i 3 usunięć

Wyświetl plik

@ -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 = ""

Wyświetl plik

@ -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):

Wyświetl plik

@ -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()