dg_closest_res_to_area {dggridR} | R Documentation |
Determine resolution based on desired area
Description
Determine an appropriate grid resolution based on a desired cell area.
Usage
dg_closest_res_to_area(
dggs,
area,
round = "nearest",
show_info = TRUE,
metric = TRUE
)
Arguments
dggs |
A dggs object from dgconstruct() |
area |
The desired area of the grid's cells |
round |
What direction to search in. Must be nearest, up, or down. |
show_info |
Print the area, spacing, and CLS of the chosen resolution. |
metric |
Whether input and output should be in metric (TRUE) or imperial (FALSE) |
Value
A number representing the grid resolution
Examples
library(dggridR)
dggs <- dgconstruct(res=20)
res <- dg_closest_res_to_area(dggs,1)
dggs <- dgsetres(dggs,res)
[Package dggridR version 3.1.0 Index]