latlong_to_quadkey: Convert latitude/longitude coordinates into QuadKeys
Description
Converts a point from latitude/longitude WGS-84 coordinates
(in degrees) into a Quadkey at a specified zoom level.
For further information, refer to the Microsoft Bing Maps Tile
System documentation.
Usage
latlong_to_quadkey(lat, lon, zoom)
Value
A dataframe with latitude (lat), longitude (lon), zoom level
(zoom) and the QuadKey as a string (quadkey).
Arguments
lat
Latitude of the point, in degrees.
lon
Longitude of the point, in degrees.
zoom
Zoom or level of detail, from 1 (lowest detail)
to 23 (highest detail).
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.