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)


102
103
104
105
# File 'lib/utilities/geo.rb', line 102

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.



99
100
101
# File 'lib/utilities/geo.rb', line 99

def coordinates
  @coordinates
end

#verbatim_labelObject (readonly)

Returns the value of attribute verbatim_label.



99
100
101
# File 'lib/utilities/geo.rb', line 99

def verbatim_label
  @verbatim_label
end