Documentation
¶
Index ¶
- Constants
- func LatLongToPixelXY(latitude, longitude float64, levelOfDetail uint64) (pixelX, pixelY int64)
- func LatLongToQuad(latitude, longitude float64, levelOfDetail uint64, ...)
- func MapSize(levelOfDetail uint64) uint64
- func PixelXYToLatLong(pixelX, pixelY int64, levelOfDetail uint64) (latitude, longitude float64)
- func PixelXYToTileXY(pixelX, pixelY int64) (tileX, tileY int64)
- func QuadKeyToBounds(quadkey string) (minLat, minLon, maxLat, maxLon float64, err error)
- func QuadKeyToTileXY(quadKey string) (tileX, tileY int64, levelOfDetail uint64)
- func TileXYToBounds(tileX, tileY int64, levelOfDetail uint64) (minLat, minLon, maxLat, maxLon float64)
- func TileXYToPixelXY(tileX, tileY int64) (pixelX, pixelY int64)
- func TileXYToQuadKey(tileX, tileY int64, levelOfDetail uint64) string
Constants ¶
const ( // EarthRadius is the radius of the earth EarthRadius = 6378137.0 // MinLatitude is the min lat MinLatitude = -85.05112878 // MaxLatitude is the max lat MaxLatitude = 85.05112878 // MinLongitude is the min lon MinLongitude = -180.0 // MaxLongitude is the max lon MaxLongitude = 180.0 // TileSize is the size of a tile TileSize = 256 // MaxLevelOfDetail is the max level of detail MaxLevelOfDetail = 38 )
Variables ¶
This section is empty.
Functions ¶
func LatLongToPixelXY ¶
LatLongToPixelXY converts a point from latitude/longitude WGS-84 coordinates (in degrees) into pixel XY coordinates at a specified level of detail. Param 'latitude' is the latitude of the point, in degrees. Param 'longitude' is the longitude of the point, in degrees. Param 'levelOfDetail' is the level of detail, from 1 (lowest detail) to N (highest detail). Return value 'pixelX' is the output parameter receiving the X coordinate in pixels. Return value 'pixelY' is the output parameter receiving the Y coordinate in pixels.
func LatLongToQuad ¶
LatLongToQuad iterates through all of the quads parts until levelOfDetail is reached.
func MapSize ¶
MapSize determines the map width and height (in pixels) at a specified level of detail. Param 'levelOfDetail' is the level of detail, from 1 (lowest detail) to N (highest detail). Returns the map width and height in pixels.
func PixelXYToLatLong ¶
PixelXYToLatLong converts a pixel from pixel XY coordinates at a specified level of detail into latitude/longitude WGS-84 coordinates (in degrees). Param 'pixelX' is the X coordinate of the point, in pixels. Param 'pixelY' is the Y coordinates of the point, in pixels. Param 'levelOfDetail' is the level of detail, from 1 (lowest detail) to N (highest detail). Return value 'latitude' is the output parameter receiving the latitude in degrees. Return value 'longitude' is the output parameter receiving the longitude in degrees.
func PixelXYToTileXY ¶
PixelXYToTileXY converts pixel XY coordinates into tile XY coordinates of the tile containing the specified pixel. Param 'pixelX' is the pixel X coordinate. Param 'pixelY' is the pixel Y coordinate. Return value 'tileX' is the output parameter receiving the tile X coordinate. Return value 'tileY' is the output parameter receiving the tile Y coordinate.
func QuadKeyToBounds ¶
QuadKeyToBounds converts a quadkey to bounds
func QuadKeyToTileXY ¶
QuadKeyToTileXY converts a QuadKey into tile XY coordinates. Param 'quadKey' is the quadKey of the tile. Return value 'tileX' is the output parameter receiving the tile X coordinate. Return value 'tileY is the output parameter receiving the tile Y coordinate. Return value 'levelOfDetail' is the output parameter receiving the level of detail.
func TileXYToBounds ¶
func TileXYToBounds(tileX, tileY int64, levelOfDetail uint64) (minLat, minLon, maxLat, maxLon float64)
TileXYToBounds returns the bounds around a tile.
func TileXYToPixelXY ¶
TileXYToPixelXY converts tile XY coordinates into pixel XY coordinates of the upper-left pixel of the specified tile. Param 'tileX' is the tile X coordinate. Param 'tileY' is the tile Y coordinate. Return value 'pixelX' is the output parameter receiving the pixel X coordinate. Return value 'pixelY' is the output parameter receiving the pixel Y coordinate.
func TileXYToQuadKey ¶
TileXYToQuadKey converts tile XY coordinates into a QuadKey at a specified level of detail. Param 'tileX' is the tile X coordinate. Param 'tileY' is the tile Y coordinate. Param 'levelOfDetail' is the Level of detail, from 1 (lowest detail) to N (highest detail). Returns a string containing the QuadKey.
Types ¶
This section is empty.