Last active
February 19, 2021 04:33
-
-
Save wroge/b7cd3c9dda9973b7085a10b09360ea00 to your computer and use it in GitHub Desktop.
OSGB36 National Grid
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"github.com/wroge/wgs84" | |
) | |
func main() { | |
lon := 0.0 | |
lat := 55.0 | |
h := 0.0 | |
east, north, h := wgs84.LonLat().To(wgs84.OSGB36NationalGrid())(lon, lat, h) | |
fmt.Println(east, north, h) | |
// 528030.0365348689 569098.4255864754 -48.499750283546746 | |
lon, lat, h = wgs84.OSGB36NationalGrid().To(wgs84.LonLat())(east, north, h) | |
fmt.Println(lon, lat, h) | |
// -6.047827130431468e-08 54.99996303067447 0.011536257341504097 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://play.golang.org/p/hBb5prdBCrt