Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yageek/lambertgo
:earth_africa: Go package to convert coordinates from Lambert to WGS84
https://github.com/yageek/lambertgo
coordinates go lambert wgs84
Last synced: 3 months ago
JSON representation
:earth_africa: Go package to convert coordinates from Lambert to WGS84
- Host: GitHub
- URL: https://github.com/yageek/lambertgo
- Owner: yageek
- License: bsd-2-clause
- Created: 2013-11-28T22:58:24.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2017-12-12T12:27:45.000Z (about 7 years ago)
- Last Synced: 2024-06-19T05:57:25.823Z (7 months ago)
- Topics: coordinates, go, lambert, wgs84
- Language: Go
- Homepage:
- Size: 998 KB
- Stars: 6
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# lambertgo
[![Build Status](https://travis-ci.org/yageek/lambertgo.svg?branch=master)](https://travis-ci.org/yageek/lambertgo)
[![Coverage Status](https://coveralls.io/repos/github/yageek/lambertgo/badge.svg?branch=master)](https://coveralls.io/github/yageek/lambertgo?branch=master)
[![GoDoc](https://godoc.org/github.com/yageek/lambertgo?status.png)](https://godoc.org/github.com/yageek/lambertgo)
[![Report Cart](http://goreportcard.com/badge/yageek/lambertgo)](http://goreportcard.com/report/yageek/lambertgo)A simple Go package to convert coordinates in Lambert projections system to GPS WGS84 coordinates. It is based on the [IGN algorithms and methods](http://geodesie.ign.fr/contenu/fichiers/documentation/algorithmes/notice/NTG_71.pdf)
# Install
```
go get gopkg.in/yageek/lambertgo.v1
```# Usage
```go
import lgo "github.com/yageek/lambertgo"
import "fmt"//Declares origin point
var point *lgo.Point= &lgo.Point{994272.661,113467.422,0,lgo.Meter}//Converts pointOrg in Lambert Zone 1 to WGS84 - Results in Radian
point.ToWGS84(lgo.LambertI)//Converts to Degree
point.ToDegree()fmt.Printf("Latitude:%.5f - Longitude:%.5f",point.Y,point.X)
``````go
import lgo "github.com/yageek/lambertgo"
import "fmt"//Declares origin point
var point *lgo.Point= &lgo.Point{2.228389, 48.824054,0,lgo.Degree}//Converts to Radian
point.ToRadian()//Converts pointOrg in WGS84 to Lambert Zone 1 - Results in Meter
point.ToLambert(lgo.LambertI)fmt.Printf("X:%.5f - Y:%.5f",point.X,point.Y)
```