From: warp Date: Sun, 26 Aug 2012 20:12:25 +0000 (+0200) Subject: Fix for issue #491, invert latitude when neccesary. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=bc875dc7cc7c3f62647dc37a7441fcf252379de5;p=mediagoblin.git Fix for issue #491, invert latitude when neccesary. --- diff --git a/mediagoblin/tools/exif.py b/mediagoblin/tools/exif.py index 98c3de27..543484c9 100644 --- a/mediagoblin/tools/exif.py +++ b/mediagoblin/tools/exif.py @@ -171,6 +171,9 @@ def get_gps_data(tags): + (float(v[2].num) / float(v[2].den) / (60 * 60)) )(dat.values) + if tags['GPS GPSLatitudeRef'].values == 'S': + gps_data['latitude'] /= -1 + if tags['GPS GPSLongitudeRef'].values == 'W': gps_data['longitude'] /= -1