From 2300189304b483f4cf8858d4eccf9a1582a44674 Mon Sep 17 00:00:00 2001 From: Piero Toffanin Date: Sat, 2 Sep 2017 20:32:25 -0400 Subject: [PATCH] Handle the case when utm zone has newline char https://github.com/OpenDroneMap/WebODM/issues/267#issuecomment-326775435 --- opendm/types.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/opendm/types.py b/opendm/types.py index 88a0bfb1..b486df36 100644 --- a/opendm/types.py +++ b/opendm/types.py @@ -307,8 +307,8 @@ class ODM_GeoRef(object): with open(_file) as f: # extract reference system and utm zone from first line. # We will assume the following format: - # 'WGS84 UTM 17N' - line = f.readline() + # 'WGS84 UTM 17N' or 'WGS84 UTM 17N \n' + line = f.readline().rstrip() log.ODM_DEBUG('Line: %s' % line) ref = line.split(' ') # match_wgs_utm = re.search('WGS84 UTM (\d{1,2})(N|S)', line, re.I) @@ -438,4 +438,4 @@ class ODM_Tree(object): self.odm_orthophoto_gdaladdo_log = io.join_paths(self.odm_orthophoto, 'gdaladdo_log.txt') def path(self, *args): - return io.join_paths(self.root_path, *args) \ No newline at end of file + return io.join_paths(self.root_path, *args)