Find the spatial resolution (i.e. grid size) of a British National Grid square, or list valid resolutions.
Usage
get_bng_resolution(bng_ref)
get_bng_resolution_string(bng_ref)
list_bng_resolution(which = c("all", "whole", "quad"), lbl = FALSE)
Arguments
- bng_ref
Vector of
BNGReference
objects to test.- which
character indicating what set of resolutions to return.
- lbl
logical. Should resolutions labels be returned? Default is
FALSE
to return numeric resolutions.
Value
A vector of numeric values for get_bng_resolution()
in metres
or character strings expressing the resolution of the grid references.
vector of BNG resolutions as either numeric values or character labels.
Details
The integer values represent spatial resolutions in metres, while the string labels provide a human-readable descriptor for each resolution level. For example, the numeric resolution 1000 is mapped to the label '1km'.
Examples
get_bng_resolution(as_bng_reference("TQ1234"))
#> [1] 1000
get_bng_resolution_string(as_bng_reference("TQ1234NE"))
#> [1] "500m"
list_bng_resolution(which = "all", lbl = TRUE)
#> [1] "100km" "50km" "10km" "5km" "1km" "500m" "100m" "50m" "10m"
#> [10] "5m" "1m"