Module: Swissgrid::WGS84
- Defined in:
- lib/swissgrid/wgs84.rb
Constant Summary collapse
- Y_BERN =
Projection centre Bern
600_000
- X_BERN =
in meters
200_000
- SCALE =
in meters
1_000_000
Class Method Summary collapse
-
.from_ch1903(a_point) ⇒ List
Converts a WGS84 point to a CH1903 point.
Class Method Details
.from_ch1903(a_point) ⇒ List
Converts a WGS84 point to a CH1903 point.
16 17 18 19 20 21 22 23 |
# File 'lib/swissgrid/wgs84.rb', line 16 def self.from_ch1903(a_point) y, x , z = a_point y_prime = (y - Y_BERN) / SCALE.to_f x_prime = (x - X_BERN) / SCALE.to_f # compute CH1903 point convert(y_prime, x_prime, z) end |