Documentation ¶
Overview ¶
Package UTM is bidirectional UTM-WGS84 converter for golang
Index ¶
- func FromLatLon(latitude, longitude float64, northern bool) (easting, northing float64, zoneNumber int, zoneLetter string, err error)
- func FromLatLonF(lat, lon float64) (easting, northing float64)deprecated
- func ToLatLon(easting, northing float64, zoneNumber int, zoneLetter string, northern ...bool) (latitude, longitude float64, err error)
- func ValidateLatLone(latitude, longitude float64) error
- type Coordinatedeprecated
- type InputError
- type LatLondeprecated
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromLatLon ¶
func FromLatLon(latitude, longitude float64, northern bool) (easting, northing float64, zoneNumber int, zoneLetter string, err error)
FromLatLon convert a latitude and longitude to Universal Transverse Mercator coordinates
func FromLatLonF
deprecated
func ToLatLon ¶
func ToLatLon(easting, northing float64, zoneNumber int, zoneLetter string, northern ...bool) (latitude, longitude float64, err error)
ToLatLon convert Universal Transverse Mercator coordinates to a latitude and longitude Since the zone letter is not strictly needed for the conversion you may also the “northern“ parameter instead, which is a named parameter and can be set to either true or false. In this case you should define fields clearly You can't set ZoneLetter or northern both.
func ValidateLatLone ¶
ValidateLatLone check that latitude and longitude are valid.
Types ¶
type Coordinate
deprecated
Coordinate contains coordinates in the Universal Transverse Mercator coordinate system
Deprecated: Use ToLatLon functions to convert LatLon instead.
func (*Coordinate) ToLatLon
deprecated
func (coordinate *Coordinate) ToLatLon(northern ...bool) (LatLon, error)
ToLatLon convert Universal Transverse Mercator coordinates to a latitude and longitude Since the zone letter is not strictly needed for the conversion you may also the “northern“ parameter instead, which is a named parameter and can be set to either true or false. In this case you should define fields clearly You can't set ZoneLetter or northern both.
Deprecated: Use ToLatLon functions to convert LatLon instead.
type InputError ¶
type InputError error
InputError allow to distinguish if an error is from UTM conversion functions.
type LatLon
deprecated
LatLon contains a latitude and longitude
Deprecated: Use FromLatLon functions to convert LatLon instead.
func (*LatLon) FromLatLon
deprecated
func (point *LatLon) FromLatLon() (coord Coordinate, err error)
FromLatLon convert a latitude and longitude to Universal Transverse Mercator coordinates
Deprecated: Use FromLatLon functions to convert LatLon instead.