Module: Silva::Location

Defined in:
lib/silva/location.rb

Overview

A spoonful of syntactic sugar for creating location systems from the relevant parameters:

loc = Silva::Location.from(:en, :easting => 651409, :northing => 31377).to(:wgs84) lat = loc.lat, long = loc.long

Class Method Summary collapse

Class Method Details

.from(system_name, options) ⇒ Silva::System

Create a location system from the given parameters.

Parameters:

  • system_name (Symbol)

    The name of the system – at present, :wgs84, :en, :osgb36 or :gridref.

  • options (Hash)

    Parameters relevant to the system (see individual systems for details).

Returns:



17
18
19
# File 'lib/silva/location.rb', line 17

def self.from(system_name, options)
  Silva::System.create(system_name, options)
end