pexif icon indicating copy to clipboard operation
pexif copied to clipboard

Add support for altitude

Open mcbridejc opened this issue 10 years ago • 1 comments

This pull requests allows set_geo and get_geo to set/get the GPSAltitude tag as well at the lat/lng.

Unfortunately, this is not backwards compatible, because get_geo now returns a 3-tuple instead of a 2-tuple. The line lat, lng = my_file.get_geo() will fail with "ValueError: too many values to unpack". Instead, one should use lat, lng, alt = my_file.get_geo().

I'll leave it up to the pexif maintainer(s) whether it's worth including this in the project or not. In any case, thanks for sharing pexif; it made my life easier today.

mcbridejc avatar Nov 17 '14 02:11 mcbridejc

I'd prefer to not merge as is, as I don't like breaking APIs. I'd suggest the one or both of the following:

1: Add a get_altitude() method. 2: Add a get_geo3d() method

Thanks for the contribution.

bennoleslie avatar Dec 01 '14 10:12 bennoleslie