UTM: github.com/im7mortal/UTM Index | Files | Directories

package UTM

import "github.com/im7mortal/UTM"

Package UTM is bidirectional UTM-WGS84 converter for golang

Index

Package Files

utm.go utm_deprecated.go

func FromLatLon Uses

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 Uses

func FromLatLonF(lat, lon float64) (easting, northing float64)

Don't use it. It panic and return no error. FromLatLonF convert a latitude and longitude to Universal Transverse Mercator coordinates.

Deprecated: Use FromLatLon functions to converse instead.

func ToLatLon Uses

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 Uses

func ValidateLatLone(latitude, longitude float64) error

ValidateLatLone check that latitude and longitude are valid.

type Coordinate Uses

type Coordinate struct {
    Easting    float64
    Northing   float64
    ZoneNumber int
    ZoneLetter string
}

Coordinate contains coordinates in the Universal Transverse Mercator coordinate system

Deprecated: Use ToLatLon functions to convert LatLon instead.

func (*Coordinate) ToLatLon Uses

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 Uses

type InputError error

InputError allow to distinguish if an error is from UTM conversion functions.

type LatLon Uses

type LatLon struct {
    Latitude  float64
    Longitude float64
}

LatLon contains a latitude and longitude

Deprecated: Use FromLatLon functions to convert LatLon instead.

func (*LatLon) FromLatLon Uses

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.

Directories

PathSynopsis
example

Package UTM imports 3 packages (graph) and is imported by 1 packages. Updated 2018-10-31. Refresh now. Tools for package owners.