Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToDegree

func ToDegree(radian float64) float64

ToDegree will convert a value in radians to degrees

func ToRadian

func ToRadian(degree float64) float64

ToRadian will convert a value in degree to radians

Types

type DMS

type DMS struct {
	Degree     int64
	Minute     int64
	Second     float64
	Hemisphere rune
}

DMS is the degree minutes and seconds

func (DMS) String

func (dms DMS) String() string

String returns the string representation.

type Ellipsoid

type Ellipsoid struct {
	Name           string
	Radius         float64
	Eccentricity   float64
	NATOCompatible bool
}

Ellipsoid describes an Ellipsoid this may change when we get a proper projection package

type Interface

type Interface interface {
	ToLngLat() LngLat
}

Interface is an interface that wraps a ToLngLat methods

ToLngLat should returns the a LngLat value in degrees that represents that given value as closely as possible. It is understood that this value may not be excate

type LngLat

type LngLat struct {
	// Longitude in decimal degrees
	Lng float64
	// Latitude in decimal degrees
	Lat float64
}

LngLat describes Latitude,Longitude values

func (LngLat) LatAsDMS

func (l LngLat) LatAsDMS() DMS

LatAsDMS returns the latitude value in Degree Minute Seconds values

func (LngLat) LatInRadians

func (l LngLat) LatInRadians() float64

LatInRadians returns the Latitude value in radians

func (LngLat) LngAsDMS

func (l LngLat) LngAsDMS() DMS

LngAsDMS returns the longitude value in Degree Minute Seconds values

func (LngLat) LngInRadians

func (l LngLat) LngInRadians() float64

LngInRadians returns the Longitude value in radians

func (LngLat) NormalizeLng

func (l LngLat) NormalizeLng() LngLat

NormalizeLng will insure that the longitude value is between 0-360

Source Files

Directories

Path Synopsis
utm Package utm provides the ability to work with UTM coordinates References: https://stevedutch.net/FieldMethods/UTMSystem.htm https://gisgeography.com/central-meridian/