Class: Utilities::Geo::CoordinatesFromLabel

Inherits:
Object
  • Object
show all
Defined in:
lib/utilities/geo.rb

Overview

class ConvertToDecimalDegrees

attr_reader(:dd, :dms)

# @param [String] coordinate
def initialize(coordinate)
  @dms = coordinate
  @dd  = Utilities::Geo.degrees_minutes_seconds_to_decimal_degrees(coordinate)
end

end

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(label) ⇒ CoordinatesFromLabel

Returns a new instance of CoordinatesFromLabel

Parameters:

  • label (String)


66
67
68
69
# File 'lib/utilities/geo.rb', line 66

def initialize(label)
  @verbatim_label = label
  @coordinates = Utilities::Geo.coordinates_regex_from_verbatim_label(label)
end

Instance Attribute Details

#coordinatesObject (readonly)

Returns the value of attribute coordinates



63
64
65
# File 'lib/utilities/geo.rb', line 63

def coordinates
  @coordinates
end

#verbatim_labelObject (readonly)

Returns the value of attribute verbatim_label



63
64
65
# File 'lib/utilities/geo.rb', line 63

def verbatim_label
  @verbatim_label
end