| dg_closest_res_to_area | R Documentation |
Finds the grid resolution that produces cells closest to the target area.
This is primarily used internally by hexify_grid and
hex_grid. Most users should use those functions directly.
dg_closest_res_to_area(
dggs,
area,
round = "nearest",
metric = TRUE,
show_info = FALSE
)
dggs |
Grid specification (aperture and topology must be set) |
area |
Target cell area in km^2 (if metric=TRUE) |
round |
Rounding method ("nearest", "up", "down") |
metric |
Whether area is in metric units |
show_info |
Print information about chosen resolution |
Resolution level (integer)
Other grid statistics:
dgearthstat(),
hexify_area_to_eff_res(),
hexify_compare_resolutions(),
hexify_eff_res_to_area(),
hexify_eff_res_to_resolution(),
hexify_resolution_to_eff_res()
# Create a temporary grid to get aperture settings
temp_grid <- list(aperture = 3, topology = "HEXAGON")
class(temp_grid) <- "hexify_grid"
# Find resolution for 1000 km^2 cells
res <- dg_closest_res_to_area(temp_grid, area = 1000,
metric = TRUE, show_info = TRUE)
print(res)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.