Printing BNG References
print.BNGReference.Rd
Supporting formatting and printing of BNGReference
objects.
Arguments
- x
An object of type
BNGReference
.- ...
Additional parameters.
- compact
Logical. Should standard spaces be added or removed for "pretty" printing? Default is
FALSE
to add spaces.
Value
format
provides a standard formatting of BNG reference objectsprint
outputs the BNG references and invisibly returns the object.
Details
Standard spaces are added: 1) after the two-letter prefix, 2) between eastings and northings, and 3) before a quadrant suffix, when those components exist in a grid reference.
Examples
x <- as_bng_reference("SU1234")
print(x)
#> <BNGReference[1] with Resolution=1km>
#> [1] <SU 12 34>
print(x, compact = TRUE)
#> <BNGReference[1] with Resolution=1km>
#> [1] <SU1234>