pixelXY_to_tileXY: Convert pixel XY coordinates into tile XY coordinates

View source: R/latlong_to_qk_functions.R

pixelXY_to_tileXYR Documentation

Convert pixel XY coordinates into tile XY coordinates

Description

Converts pixel XY coordinates into tile XY coordinates of the tile containing the specified pixel. For further information, refer to the Microsoft Bing Maps Tile System documentation.

Usage

pixelXY_to_tileXY(pixelX, pixelY)

Arguments

pixelX

Pixel X coordinate.

pixelY

Pixel Y coordinate.

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 list returning the tile X and tile Y coordinates.

References

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

Examples


pixelXY_to_tileXY(
  pixelX = 5916,
  pixelY = 9894
)


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