View source: R/hexify_conversions.R
| hexify_cell_to_plane | R Documentation |
Converts DGGRID-compatible cell IDs directly to PLANE coordinates. Returns the cell center in the unfolded icosahedron layout.
hexify_cell_to_plane(cell_id, resolution, aperture = 3L)
cell_id |
Numeric vector of cell IDs (1-based) |
resolution |
Grid resolution level (0-30) |
aperture |
Grid aperture: 3, 4, or 7 |
Compatible with 'dggridR' dgSEQNUM_to_PLANE().
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) |
hexify_icosa_tri_to_plane for triangle conversion,
hexify_lonlat_to_plane for lon/lat conversion
Other coordinate conversion:
hexify_cell_id_to_quad_ij(),
hexify_cell_to_icosa_tri(),
hexify_cell_to_lonlat(),
hexify_cell_to_quad_ij(),
hexify_cell_to_quad_xy(),
hexify_grid_cell_to_lonlat(),
hexify_grid_to_cell(),
hexify_icosa_tri_to_plane(),
hexify_icosa_tri_to_quad_ij(),
hexify_icosa_tri_to_quad_xy(),
hexify_lonlat_to_cell(),
hexify_lonlat_to_plane(),
hexify_lonlat_to_quad_ij(),
hexify_quad_ij_to_cell(),
hexify_quad_ij_to_icosa_tri(),
hexify_quad_ij_to_xy(),
hexify_quad_xy_to_cell(),
hexify_quad_xy_to_icosa_tri(),
hexify_roundtrip_test()
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.