Last active
December 17, 2015 22:09
-
-
Save jeromenerf/5679866 to your computer and use it in GitHub Desktop.
Back and forth Google WGS84 and STIF Lambert 2 Étendu, via Lambert 93
This file contains hidden or 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" | |
| proj "github.com/pebbe/go-proj-4/proj" | |
| ) | |
| func main () { | |
| // BONNE NOUVELLE | |
| lat := 48.8674451 | |
| long := 2.3496033 | |
| //l2et, _ := proj.NewProj("+init=epsg:27572") | |
| l2et, _ := proj.NewProj("+proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=2.33722917 +k_0=0.99987742 +x_0=600000 + y_0=2200000 +a=6378249.2 +b=6356515 +pm=paris +units=m +no_defs no_defs <>") | |
| x, y, _ := proj.Fwd(l2et, long, lat) | |
| fmt.Printf("x/y : %.2f %.2f\n", x, y) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment