Documentation
¶
Index ¶
- func FromLatLon(latitude, longitude float64, northern bool) (easting, northing float64, zoneNumber int, zoneLetter string, err error)
- func FromLatLonZone(latitude, longitude float64, northern bool, zn int) (easting, northing float64, zoneNumber int, zoneLetter string, err error)
- func ToLatLon(easting, northing float64, zoneNumber int, zoneLetter string, northern ...bool) (latitude, longitude float64, err error)
- func ValidateLatLone(latitude, longitude float64) error
- type InputError
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 FromLatLonZone ¶
func FromLatLonZone(latitude, longitude float64, northern bool, zn int) (easting, northing float64, zoneNumber int, zoneLetter string, err error)
FromLatLonZone convert a latitude and longitude to Universal Transverse Mercator coordinates enforcing a particular zone, which is useful where maps overlap zone edges
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 InputError ¶
type InputError error
InputError allow to distinguish if an error is from UTM conversion functions.