Helper functions to provide access to the bounds and set of 100km grid reference identifiers.
Arguments
- arranged
logical. Should the grid reference letters be arranged into a 2D matrix? Default is
FALSE.- named
logical. Should the bounding box vector include the names (e.g. 'xmin')? Default is
TRUE.
Value
a character vector of 2-letter identifiers for all valid 100km grid
squares. When arranged is TRUE this vector is coerced into a
2D matrix.
a numeric vector with four values for the xmin, ymin, xmax, and ymax coordinates for the valid extant of the British National Grid.
Details
When arranged is TRUE, the matrix arrangement matches the
British National Grid, but note the orientation. The first element "SV" would
be mapped in the southwest corner.
Examples
list_bng_prefixes()
#> [1] "SV" "SW" "SX" "SY" "SZ" "TV" "TW" "SQ" "SR" "SS" "ST" "SU" "TQ" "TR" "SL"
#> [16] "SM" "SN" "SO" "SP" "TL" "TM" "SF" "SG" "SH" "SJ" "SK" "TF" "TG" "SA" "SB"
#> [31] "SC" "SD" "SE" "TA" "TB" "NV" "NW" "NX" "NY" "NZ" "OV" "OW" "NQ" "NR" "NS"
#> [46] "NT" "NU" "OQ" "OR" "NL" "NM" "NN" "NO" "NP" "OL" "OM" "NF" "NG" "NH" "NJ"
#> [61] "NK" "OF" "OG" "NA" "NB" "NC" "ND" "NE" "OA" "OB" "HV" "HW" "HX" "HY" "HZ"
#> [76] "JV" "JW" "HQ" "HR" "HS" "HT" "HU" "JQ" "JR" "HL" "HM" "HN" "HO" "HP" "JL"
#> [91] "JM"
list_bng_prefixes(arranged = TRUE)
#> [,1] [,2] [,3] [,4] [,5] [,6] [,7]
#> [1,] "SV" "SW" "SX" "SY" "SZ" "TV" "TW"
#> [2,] "SQ" "SR" "SS" "ST" "SU" "TQ" "TR"
#> [3,] "SL" "SM" "SN" "SO" "SP" "TL" "TM"
#> [4,] "SF" "SG" "SH" "SJ" "SK" "TF" "TG"
#> [5,] "SA" "SB" "SC" "SD" "SE" "TA" "TB"
#> [6,] "NV" "NW" "NX" "NY" "NZ" "OV" "OW"
#> [7,] "NQ" "NR" "NS" "NT" "NU" "OQ" "OR"
#> [8,] "NL" "NM" "NN" "NO" "NP" "OL" "OM"
#> [9,] "NF" "NG" "NH" "NJ" "NK" "OF" "OG"
#> [10,] "NA" "NB" "NC" "ND" "NE" "OA" "OB"
#> [11,] "HV" "HW" "HX" "HY" "HZ" "JV" "JW"
#> [12,] "HQ" "HR" "HS" "HT" "HU" "JQ" "JR"
#> [13,] "HL" "HM" "HN" "HO" "HP" "JL" "JM"
list_bng_bounds()
#> xmin ymin xmax ymax
#> 0 0 700000 1300000