Beispiel #1
0
 def add_lat_lon(self, lat, lon, precision=1e7):
     """Add lat, lon to gps (lat, lon in float)."""
     self._ef["GPS"][piexif.GPSIFD.GPSLatitudeRef] = "N" if lat > 0 else "S"
     self._ef["GPS"][piexif.GPSIFD.GPSLongitudeRef] = "E" if lon > 0 else "W"
     self._ef["GPS"][piexif.GPSIFD.GPSLongitude] = decimal_to_dms(
         abs(lon), int(precision))
     self._ef["GPS"][piexif.GPSIFD.GPSLatitude] = decimal_to_dms(
         abs(lat), int(precision))
Beispiel #2
0
 def add_lat_lon(self, lat, lon, precision=1e7):
     """Add lat, lon to gps (lat, lon in float)."""
     self._ef["GPS"][piexif.GPSIFD.GPSLatitudeRef] = "N" if lat > 0 else "S"
     self._ef["GPS"][piexif.GPSIFD.GPSLongitudeRef] = "E" if lon > 0 else "W"
     self._ef["GPS"][piexif.GPSIFD.GPSLongitude] = decimal_to_dms(
         abs(lon), int(precision))
     self._ef["GPS"][piexif.GPSIFD.GPSLatitude] = decimal_to_dms(
         abs(lat), int(precision))