cell_to_lonlat: Convert cell ID to longitude/latitude

View source: R/grid_helpers.R

cell_to_lonlatR Documentation

Convert cell ID to longitude/latitude

Description

Converts DGGS cell IDs back to geographic coordinates (cell centers).

Usage

cell_to_lonlat(cell_id, grid)

Arguments

cell_id

Numeric vector of cell IDs

grid

A HexGridInfo or HexData object

Value

Data frame with lon_deg and lat_deg columns

See Also

lonlat_to_cell for the forward operation

Examples

grid <- hex_grid(area_km2 = 1000)
cells <- lonlat_to_cell(c(0, 10), c(45, 50), grid)
coords <- cell_to_lonlat(cells, grid)

hexify documentation built on March 1, 2026, 1:07 a.m.