New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nice gem, but can't get lat/lng #21

Closed
cleesmith opened this Issue Aug 2, 2011 · 3 comments

Comments

3 participants
@cleesmith

cleesmith commented Aug 2, 2011

Hi,

I wasn't able to retrieve the latitude/longitude from various images using:
EXIFR::JPEG.new('enkhuizen.jpg').gps.latitude
EXIFR::JPEG.new('enkhuizen.jpg').gps.longitude

... however, the following does work:
EXIFR::JPEG.new('enkhuizen.jpg').gps_latitude
EXIFR::JPEG.new('enkhuizen.jpg').gps_longitude

Perhaps it's a typo or maybe there are camera where gps.latitude works ?

I tried these cameras: Nikon (Coolpix P6000), Ricoh (Caplio 500SE), Pentax (Optio WG-1 GPS), and a Ricoh (Caplio Pro G3).

Thanks,
Chris

@remvee

This comment has been minimized.

Owner

remvee commented Aug 3, 2011

The gps accessor will be available in the next release. See the commit log for the chronology.

@remvee remvee closed this Aug 3, 2011

@cleesmith

This comment has been minimized.

cleesmith commented Aug 3, 2011

Cool, I look forward to it ... thanks.

@saravk

This comment has been minimized.

saravk commented Sep 10, 2011

Im looking forward to it as well.. In the meantime i using the following code to extract the lat/lng values from the EXIF data..

arr = exif.gps_latitude
pic.lat = arr[0].to_f + arr[1].to_f/60 + arr[2].to_f/3600
pic.lat *= exif.gps_latitude_ref == 'S' ? -1 : 1

arr = exif.gps_longitude
pic.lng = arr[0].to_f + arr[1].to_f/60 + arr[2].to_f/3600
pic.lng *= exif.gps_longitude_ref == 'W' ? -1 : 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment