Skip to content

Latest commit

 

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PhotoGeoloader

Gem Version Build Status

Ruby gem loading GPS position from photo's EXIF informations into (Rails) models.

Created and tested for photos from iPhone and placing it to model.

Usage

Simplest - load position data and handle on your own

photo = PhotoGeoloader.new('path/to/photo.jpg')
p photo.position[:latitude]
p photo.position[:longitude]
p photo.position[:altitude]

Rails model example

# attributes: photo (string, carrierwave uploader), latitude (float), longitude (float), altitude (float)
class Photo < ActiveRecord::Base
  attr_accessible :photo
  mount_uploader :photo, MyPhotoUploader
  before_create do
    PhotoGeoloader.new(photo.path).place_attributes self
  end
end

License

Released under MIT license

About

Ruby gem loading GPS position from photo's EXIF informations into Rails models

Resources

Stars

6 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages