Skip to contents

Converts DGGRID-compatible cell IDs directly to PLANE coordinates. Returns the cell center in the unfolded icosahedron layout.

Usage

hexify_cell_to_plane(cell_id, resolution, aperture = 3L)

Arguments

cell_id

Cell IDs, from 1: integer64, or whole numbers below 2^53

resolution

Grid resolution level (0-30 for aperture 3, 0-29 for aperture 4, 0-21 for aperture 7)

aperture

Grid aperture: 3, 4, or 7

Value

Data frame with columns:

plane_x

X coordinate in PLANE space (range ~0 to 5.5)

plane_y

Y coordinate in PLANE space (range ~0 to 1.73)

Details

Compatible with 'dggridR' dgSEQNUM_to_PLANE().

Examples

# Get PLANE coordinates for cells
plane <- hexify_cell_to_plane(cell_id = c(100, 200, 300),
                               resolution = 5, aperture = 3)
plot(plane$plane_x, plane$plane_y)