Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wroge/b7cd3c9dda9973b7085a10b09360ea00 to your computer and use it in GitHub Desktop.
Save wroge/b7cd3c9dda9973b7085a10b09360ea00 to your computer and use it in GitHub Desktop.
OSGB36 National Grid
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
}
@wroge
Copy link
Author

wroge commented Feb 19, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment