Skip to content
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
Closed

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

cleesmith opened this issue Aug 2, 2011 · 3 comments

Comments

@cleesmith
Copy link

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
Copy link
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 as completed Aug 3, 2011
@cleesmith
Copy link
Author

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

@saravk
Copy link

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants