Sha256: 2d8f8f45c893d44e2161b1362db37eaa8d1314658049dc97236171315f39a404

Contents?: true

Size: 379 Bytes

Versions: 3

Compression:

Stored size: 379 Bytes

Contents

module GeoSwap
  class UtmPoint

    attr_reader :zone, :easting, :northing, :hemisphere

    def initialize(attrs)
      @easting = attrs.fetch(:easting)
      @northing = attrs.fetch(:northing)
      @zone = attrs.fetch(:zone)
      @hemisphere = attrs.fetch(:hemisphere)
    end

    def to_s
      "#{zone.number}#{zone.letter} #{easting}mE #{northing}mN"
    end

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
geo_swap-0.2.1 lib/geo_swap/utm_point.rb
geo_swap-0.2.0 lib/geo_swap/utm_point.rb
geo_swap-0.1.0 lib/geo_swap/utm_point.rb