Learn R Programming

cwhmisc (version 6.0)

astroGeo: Convert geographical coordinates to and from Swiss topo coordinates

Description

Geographic and Swiss topo rectangular coordinates, X positive to the north, Y positive to the east (!)

Usage

LB2MK( long, lat ) LB2YX( long, lat ) YX2LB( yToEast, xToNorth ) YX2MK( yToEast, xToNorth )

Arguments

long,lat, yToEast, xToNorth
Real

Details

LB2MK From geogr. longitude and latitude to planar meridian convergence [gon]. LB2YX From geogr. longitude and latitude to Swiss coordinates. YX2LB From Swiss coordinates to geogr. longitude and latitude. YX2MK From Swiss coordinates North and East to planar meridian convergence [gon]. LongBerne, LatBerne geogr. coordinates of Berne, 7deg26'22.50" east, 46deg57'08.66" north. yToEastBerne, xToNorthBerne Swiss topo coordinates of refernce point near Berne.

Examples

Run this code
LB2MK( LongBerne, LatBerne) #  7.21188e-16 [gon]
LB2MK( 9.132582913360895, 46.18669420448755) # somewhere in Switzerland , 1.37472
LB2YX( LongBerne, LatBerne) # 600.0, 200.0
YX2LB ( yToEastBerne, xToNorthBerne ) # 7.439583333333334  4695240555555557
YX2MK ( 600, 200) #  =   0

Run the code above in your browser using DataLab