Documentation ¶
Overview ¶
Package webmercator does the translation to and from WebMercator and WGS84 Gotten from: http://wiki.openstreetmap.org/wiki/Mercator#C.23
Index ¶
- Constants
- Variables
- func LatToY(lat float64) float64
- func LonToX(lon float64) float64
- func PLatToY(lat float64) float64
- func PLonToX(lon float64) float64
- func PToLonLat(c ...float64) ([]float64, error)
- func PToXY(c ...float64) ([]float64, error)
- func PXToLon(x float64) float64
- func PYToLat(y float64) float64
- func ToLonLat(c ...float64) ([]float64, error)
- func ToXY(c ...float64) ([]float64, error)
- func XToLon(x float64) float64
- func YToLat(y float64) float64
Constants ¶
const ( RMajor = 6378137.0 RMinor = 6356752.3142 Ratio = RMinor / RMajor )
const (
EarthRadius = RMajor
)
Variables ¶
var Com float64
var Eccent float64
var ErrCoordsRequire2Values = errors.New("Coords should have at least 2 coords")
Functions ¶
func PToLonLat ¶ added in v0.2.0
PToLonLat given a set of coordinates (x,y) it will convert them to Lon/Lat coordinates. If more then x,y is given (i.e. z, and m) they will be returned untransformed.
func PToXY ¶ added in v0.2.0
PToXY given a set of coordinates (lon,lat) it will convert them to X,Y coordinates. If more then lon/lat is given (i.e. z, and m) they will be returned untransformed.
func ToLonLat ¶
ToLonLat given a set of coordinates (x,y) it will convert them to Lon/Lat coordinates. If more then x,y is given (i.e. z, and m) they will be returned untransformed.
func ToXY ¶
ToXY given a set of coordinates (lon,lat) it will convert them to X,Y coordinates. If more then lon/lat is given (i.e. z, and m) they will be returned untransformed.
Types ¶
This section is empty.