kopia lustrzana https://github.com/OpenDroneMap/ODM
More robust EXIF parsing
rodzic
b6f0fbdcb9
commit
5840450d0f
|
@ -9,7 +9,7 @@ ExternalProject_Add(${_proj_name}
|
||||||
#--Download step--------------
|
#--Download step--------------
|
||||||
DOWNLOAD_DIR ${SB_DOWNLOAD_DIR}
|
DOWNLOAD_DIR ${SB_DOWNLOAD_DIR}
|
||||||
GIT_REPOSITORY https://github.com/OpenDroneMap/OpenSfM/
|
GIT_REPOSITORY https://github.com/OpenDroneMap/OpenSfM/
|
||||||
GIT_TAG 211
|
GIT_TAG 221
|
||||||
#--Update/Patch step----------
|
#--Update/Patch step----------
|
||||||
UPDATE_COMMAND git submodule update --init --recursive
|
UPDATE_COMMAND git submodule update --init --recursive
|
||||||
#--Configure step-------------
|
#--Configure step-------------
|
||||||
|
|
|
@ -315,18 +315,19 @@ class ODM_Photo:
|
||||||
def dms_to_decimal(self, dms, sign):
|
def dms_to_decimal(self, dms, sign):
|
||||||
"""Converts dms coords to decimal degrees"""
|
"""Converts dms coords to decimal degrees"""
|
||||||
degrees, minutes, seconds = self.float_values(dms)
|
degrees, minutes, seconds = self.float_values(dms)
|
||||||
|
|
||||||
return (-1 if sign.values[0] in 'SWsw' else 1) * (
|
if degrees is not None and minutes is not None and seconds is not None:
|
||||||
degrees +
|
return (-1 if sign.values[0] in 'SWsw' else 1) * (
|
||||||
minutes / 60 +
|
degrees +
|
||||||
seconds / 3600
|
minutes / 60 +
|
||||||
)
|
seconds / 3600
|
||||||
|
)
|
||||||
|
|
||||||
def float_values(self, tag):
|
def float_values(self, tag):
|
||||||
if isinstance(tag.values, list):
|
if isinstance(tag.values, list):
|
||||||
return [float(v.num) / float(v.den) for v in tag.values]
|
return [float(v.num) / float(v.den) if v.den != 0 else None for v in tag.values]
|
||||||
else:
|
else:
|
||||||
return [float(tag.values.num) / float(tag.values.den)]
|
return [float(tag.values.num) / float(tag.values.den) if tag.values.den != 0 else None]
|
||||||
|
|
||||||
def float_value(self, tag):
|
def float_value(self, tag):
|
||||||
v = self.float_values(tag)
|
v = self.float_values(tag)
|
||||||
|
|
Ładowanie…
Reference in New Issue