-
-
Save nono/5705073 to your computer and use it in GitHub Desktop.
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" | |
| ) | |
| const ( | |
| // Epsg = "+init=epsg:27572" | |
| Epsg = "+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 +pm=paris +units=m +no_defs no_defs <>" | |
| // Epsg = "+proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=0 +k_0=0.99987742 +x_0=600000 +y_0=2200000 +a=6378249.2 +pm=paris +units=m +no_defs no_defs <>" | |
| // Epsg = "+proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=0 +k_0=0.99987742 +x_0=600000 +y_0=2200000 +a=6378249.2 +b=6356515 +pm=paris +units=m +no_defs no_defs <>" | |
| ) | |
| func main() { | |
| // BONNE NOUVELLE | |
| // lat := 48.8674451 | |
| // long := 2.3496033 | |
| // Orly Ouest | |
| lat := 48.729664 | |
| long := 2.360143 | |
| l2et, _ := proj.NewProj(Epsg) | |
| 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
@nono : vaut ptet mieux rajouter le param +b=6356515