Fixed GCP initialization

pull/997/head
Piero Toffanin 2019-06-21 15:33:10 -04:00
rodzic 12ea7dbe39
commit 84d7994f3d
3 zmienionych plików z 5 dodań i 3 usunięć

Wyświetl plik

@ -6,9 +6,6 @@ from pyproj import CRS
class GCPFile: class GCPFile:
def __init__(self, gcp_path): def __init__(self, gcp_path):
if not gcp_path:
raise RuntimeError("gcp_path must be specified")
self.gcp_path = gcp_path self.gcp_path = gcp_path
self.entries = [] self.entries = []
self.raw_srs = "" self.raw_srs = ""

Wyświetl plik

@ -147,6 +147,7 @@ class ODM_Reconstruction(object):
except: except:
log.ODM_WARNING('Could not generate coordinates file. An orthophoto will not be generated.') log.ODM_WARNING('Could not generate coordinates file. An orthophoto will not be generated.')
self.gcp = GCPFile(None)
return self.georef return self.georef
def save_proj_srs(self, file): def save_proj_srs(self, file):

Wyświetl plik

@ -53,5 +53,9 @@ class TestGcp(unittest.TestCase):
self.assertTrue(copy.exists()) self.assertTrue(copy.exists())
self.assertEqual(copy.entries_count(), 1) self.assertEqual(copy.entries_count(), 1)
def test_null_gcp(self):
gcp = GCPFile(None)
self.assertFalse(gcp.exists())
if __name__ == '__main__': if __name__ == '__main__':
unittest.main() unittest.main()