Documentation ¶
Overview ¶
Package lambertgo helps to transform coordinates from Lambert system into the WGS84 system.
Index ¶
Examples ¶
Constants ¶
View Source
const ( // LambertI represents the first Lambert zone. LambertI = 0 // LambertII represents the second Lambert zone. LambertII = 1 // LambertIII represents the third Lambert zone. LambertIII = 2 // LambertIV represents the fourth Lambert zone. LambertIV = 3 // LambertIIE represents the extended lambert zone. LambertIIE = 4 // Lambert93 represents the lambert 93 zone. Lambert93 = 5 )
View Source
const ( // Degree represents standart degrees unit. Degree = iota // Grad represents standart grad unit. Grad = iota // Radian represents standart radian unit. Radian = iota // Meter represents standart meter unit. Meter = iota //EClarkIGN represents the E value from Clark ellipsoïd. EClarkIGN float64 = 0.08248325676 //EWGS84 represents the E value from WGS84 ellipsoïd. EWGS84 float64 = 0.08181919106 //AClarkIGN represents the A value from Clark ellipsoïd. AClarkIGN float64 = 6378249.2 //AWGS84 represents the A value from WGS84 ellipsoïd. AWGS84 float64 = 6378137.0 //ParisLongitudeMeridian is the Paris's meridian longitude in radian. ParisLongitudeMeridian float64 = 0 //GreenwichLongitudeMeridian is the Greenwich's meridian longitude in radian. GreenwichLongitudeMeridian float64 = 0.04079234433 //IERSLongitudeMeridian is the IERS's meridian longitude in radian. IERSLongitudeMeridian float64 = 3 * math.Pi / 180.0 )
Variables ¶
View Source
var DefaultEPS = 1e-10
DefaultEPS is the comparison margin used in the different algorithms.
Functions ¶
This section is empty.
Types ¶
type Point ¶
Point represents a generic point with three space coordinates and unit.
func (*Point) ToDegree ¶
func (pt *Point) ToDegree()
ToDegree converts the coordinates from Radian or Grad to Degree.
func (*Point) ToGrad ¶
func (pt *Point) ToGrad()
ToGrad converts the coordinates from Degree or Radian to Degree.
func (*Point) ToRadian ¶
func (pt *Point) ToRadian()
ToRadian converts the coordinates from Degree or Grad to Degree.
func (*Point) ToWGS84 ¶
ToWGS84 converts coordinates expressed in Meter in the lambert system to Radian in the WGS84 system. It takes the lambert Zone ine parameters.
Example ¶
var point = &Point{668832.5384, 6950138.7285, 0, Meter} point.ToWGS84(Lambert93) fmt.Printf("Latitude:%5f - Longitude:%.5f", point.Y, point.X)
Output: Latitude:0.866549 - Longitude:0.04483
Click to show internal directories.
Click to hide internal directories.