quadkey_to_latlong: Convert a string of Quadkey numbers to lat/long coordinates

View source: R/qk_to_latlong_functions.R

quadkey_to_latlongR Documentation

Convert a string of Quadkey numbers to lat/long coordinates

Description

This function converts Quadkeys to latitude/longitude WGS-84 coordinates (in degrees). For further information, refer to the Microsoft Bing Maps Tile System documentation.

Usage

quadkey_to_latlong(quadkey_data)

Arguments

quadkey_data

A single QuadKey as a string or a vector with unique QuadKeys.

Details

Converting latitude/longitude coordinates into a QuadKey and then back to latitude/longitude won't yield identical values, unless the initial latitude/longitude coordinates correspond to the upper-left Quadkey's pixel and tile XY coordinates at the same zoom level.

Understanding this distinction is crucial for the accurate use of these functions in coordinate conversions.

For a detailed explanation on how to use this and other similar quadkeyr functions, read the the vignette: https://docs.ropensci.org/quadkeyr/articles/quadkey_to_sf_conversion.html

Value

A sf POINT data.frame with a quadkey column. The latitude/longitude coordinates represent the upper-left corner of the QuadKey.

References

https://learn.microsoft.com/en-us/bingmaps/articles/bing-maps-tile-system

See Also

quadkey_to_tileXY

tileXY_to_pixelXY

pixelXY_to_latlong

Examples


quadkey_to_latlong(quadkey_data = "213")
quadkey_to_latlong(quadkey_data = c("213", "212", "210"))


quadkeyr documentation built on April 3, 2025, 8:52 p.m.