Documentation ¶
Overview ¶
Package mercator contains conversion tools for the Spherical Mercator coordinate system See http://www.maptiler.org/google-maps-coordinates-tile-bounds-projection/
Index ¶
- func LatLonToMeters(lat, lon float64) (float64, float64)
- func LatLonToPixels(lat, lon float64, zoom int) (float64, float64)
- func LatLonToTile(lat, lon float64, zoom int) (int, int)
- func MetersToLatLon(x, y float64) (float64, float64)
- func MetersToPixels(x, y float64, zoom int) (float64, float64)
- func MetersToTile(x, y float64, zoom int) (int, int)
- func PixelsToLatLon(px, py float64, zoom int) (float64, float64)
- func PixelsToMeters(px, py float64, zoom int) (float64, float64)
- func PixelsToTile(px, py float64) (int, int)
- func Resolution(zoom int) float64
- func Zoom(resolution float64) int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LatLonToMeters ¶
LatLonToMeters converts given lat/lon in WGS84 Datum to XY in Spherical Mercator EPSG:900913
func LatLonToPixels ¶
LatLonToPixels converts given lat/lon in WGS84 Datum to pixel coordinates in given zoom level
func LatLonToTile ¶
LatLonToTile returns tile for given lat/lon coordinates
func MetersToLatLon ¶
MetersToLatLon converts XY point from Spherical Mercator EPSG:900913 to lat/lon in WGS84 Datum
func MetersToPixels ¶
MetersToPixels converts EPSG:900913 to pixel coordinates in given zoom level
func MetersToTile ¶
MetersToTile returns tile for given mercator coordinates
func PixelsToLatLon ¶
PixelsToLatLon converts pixel coordinates in given zoom level to lat/lon in WGS84 Datum
func PixelsToMeters ¶
PixelsToMeters converts pixel coordinates in given zoom level of pyramid to EPSG:900913
func PixelsToTile ¶
PixelsToTile returns a tile covering region in given pixel coordinates
func Resolution ¶
Resolution calculates the resolution (meters/pixel) for given zoom level (measured at Equator)
Types ¶
This section is empty.