Skip to contents

Functions to support working with objects of type BNGReference.

Usage

# S3 method for BNGReference
[(x, i)

# S3 method for BNGReference
[[(x, i)

# S3 method for BNGReference
[(x, i) <- value

# S3 method for BNGReference
[[(x, i) <- value

# S3 method for BNGReference
c(...)

# S3 method for BNGReference
unique(x, incomparables = FALSE, ...)

# S3 method for BNGReference
as.data.frame(x, ...)

Arguments

x

Object of class BNGReference.

i

Record selection.

value

A suitable replacement value of type BNGReference.

...

Additional parameters.

incomparables

A vector of values that cannot be compared. See unique.

Value

A vector of type BNGReference.

Details

The BNG is structured using a hierarchical system of grid squares at various resolutions. At its highest level, the grid is divided into 100 km by 100 km squares, each of which is identified by a two-letter code. Successive levels of resolution further subdivide the grid squares into finer detail, down to individual 1-meter squares.

Examples

x <- as_bng_reference(c("TQ1234", "SU5678"))

x[1]
#> <BNGReference[1] with Resolution=1km>
#> [1] <TQ 12 34>

x[2] <- as_bng_reference("SU56")
x
#> <BNGReference[2] with multiple resolutions>
#> [1] <TQ 12 34> <SU 5 6>