Module: Utilities

Defined in:
lib/utilities/geo.rb,
lib/utilities.rb,
lib/utilities/net.rb,
lib/utilities/params.rb

Overview

Utilities for processing params. Probably grossly redundant with some gem and too permissive in general.

Defined Under Namespace

Modules: CSV, CollectingMethods, Dates, Elevation, Files, Geo, Hashes, Heatmap, Italicize, Latin, Logic, Measurements, Net, Numbers, Params, RandomToken, Strings Classes: CleanseFilename, Hierarchy

Instance Method Summary collapse

Instance Method Details

#gps_dataNil

Returns currently handling this client side.

Returns:

  • (Nil)

    currently handling this client side



754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
# File 'lib/utilities/geo.rb', line 754

def gps_data
  # if there is EXIF data, pulls out geographic coordinates & returns hash of lat/long in decimal degrees
  # (5 digits after decimal point if available)
  # EXIF gps information is in http://web.archive.org/web/20131018091152/http://exif.org/Exif2-2.PDF section 4.6.6
  # note that cameras follow specifications, but EXIF data can be edited manually and may not follow specifications.

  # check if gps data is in d m s (could be edited manually)
  #   => format dd/1,mm/1,ss/1 or dd/1,mmmm/100,0/1 or 40/1, 5/1, 314437/10000
  # N = +
  # S = -
  # E = +
  # W = -
  # Altitude should be based on reference of sea level
  # GPSAltitudeRef is 0 for above sea level, and 1 for below sea level

  # From discussion with Jim -
  # create a utility library called "GeoConvert" and define single method
  # that will convert from degrees min sec to decimal degree
  # - maybe 2 versions? - one returns string, other decimal?
end