Module: Swissgrid

Defined in:
lib/swissgrid.rb,
lib/swissgrid/wgs84.rb,
lib/swissgrid/ch1903.rb,
lib/swissgrid/version.rb

Defined Under Namespace

Modules: CH1903, WGS84

Constant Summary collapse

Ch1903 =

to be compatible to previous versions

CH1903
VERSION =
"0.1.1"

Class Method Summary collapse

Class Method Details

.CH1903(a_point) ⇒ List

Converts a WGS84 point to a CH1903 point.

Parameters:

  • a_point (List)

    the WGS84 point to be converted.

Returns:

  • (List)

    the converted WGS84 point as CH1903 point.



13
14
15
# File 'lib/swissgrid.rb', line 13

def self.CH1903(a_point)
  CH1903.from_wgs84(a_point)
end

.WGS84(a_point) ⇒ List

Converts a CH1903 point to a WGS84 point.

Parameters:

  • a_point (List)

    the CH1903 point to be converted.

Returns:

  • (List)

    the converted CH1903 point as WGS84 point.



22
23
24
# File 'lib/swissgrid.rb', line 22

def self.WGS84(a_point)
  WGS84.from_ch1903(a_point)
end