powered by
Determine an appropriate grid resolution based on a desired cell area.
dg_closest_res_to_area( dggs, area, round = "nearest", show_info = TRUE, metric = TRUE )
A number representing the grid resolution
A dggs object from dgconstruct()
The desired area of the grid's cells
What direction to search in. Must be nearest, up, or down.
Print the area, spacing, and CLS of the chosen resolution.
Whether input and output should be in metric (TRUE) or imperial (FALSE)
library(dggridR) dggs <- dgconstruct(res=20) res <- dg_closest_res_to_area(dggs,1) dggs <- dgsetres(dggs,res)
Run the code above in your browser using DataLab