Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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)
```