Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

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

Closed
cleesmith opened this Issue August 02, 2011 · 3 comments

3 participants

chris Remco van 't Veer Saravana
chris

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

Remco van 't Veer
Owner

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

Remco van 't Veer remvee closed this August 02, 2011
chris

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

Saravana

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
Something went wrong with that request. Please try again.