get_qk_coord: Get lat/long coordinates from the QuadKey

View source: R/get_coords.R

get_qk_coordR Documentation

Get lat/long coordinates from the QuadKey

Description

Reads the QuadKey as a string and extracts the lat/long coordinates of the upper-left corner of the QuadKey.

Usage

get_qk_coord(data)

Arguments

data

A dataframe with a quadkey column.

Value

A sf POINT data.frame containing the tiles XY coordinates (tileX, tileY), the QuadKeys (quadkey), and a geometry column.

See Also

quadkey_to_tileXY

tileXY_to_pixelXY

pixelXY_to_latlong

Examples


grid <- create_qk_grid(
  xmin = -59,
  xmax = -40,
  ymin = -38,
  ymax = -20,
  zoom = 6
)

# quadkey column in grid$data converted to geographic coordinates
grid_coords <- get_qk_coord(data = grid$data)

plot(grid_coords)

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