Skip to content

Instantly share code, notes, and snippets.

@nono
Forked from jeromenerf/gist:5679866
Last active December 18, 2015 01:39
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 nono/5705073 to your computer and use it in GitHub Desktop.
Save nono/5705073 to your computer and use it in GitHub Desktop.
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)
}
@jeromenerf
Copy link

@nono : vaut ptet mieux rajouter le param +b=6356515

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