Manipulate OSGB or OSNI grid reference string

Share:

Description

Extracts grid reference strings at various precisions from the supplied grid reference string - if possible! For example, if you supply a 1km square reference TL2998, then you could get the 10km square TL29, but not a 100m square grid reference.

Usage

1
2
gridRef(grid = NULL, format = c("sq10km", "sq5km", "tetrad", "sq1km",
  "sq100m", "sq10m"))

Arguments

grid

the grid reference to be manipulated

format

the format you want back. The possibilities are: sq10km, sq5km, tetrad, sq1km, sq100m, sq10m

Value

a list of class "gridref" with the following contents:

grid

the original grid reference

gfmt

the grid reference string formatted as requested

system

the grid reference system, either "OSGB" or "OSNI"

precision

the precision of the formatted grid reference in metres

Note

Tetrads and 5kms
Tetrads are 2x2km squares and are often used for mapping distributions at a the scale of a county or similar sized local area. They are labelled using the 10km square followed by a single, upper-case letter (since there are 25 tetrads in a 10km square, the letter "O" is not used to avaiod confusion with zero). For example: TL29S. Letters are used as follows:

0 +---+---+---+---+---+
. | E | J | P | U | Z |
8 +---+---+---+---+---+
. | D | I | N | T | Y |
6 +---+---+---+---+---+
. | C | H | M | S | X |
4 +---+---+---+---+---+
. | B | G | L | R | W |
2 +---+---+---+---+---+
. | A | F | K | Q | V |
0 +---+---+---+---+---+
..0...2...4...6...8...0

This is named the DINTY system after the letters in the second row of this table.

5x5km squares (sometimes called "pentads") are used for mapping at a regional scale. They are labelled using the name of the 10km square followed by two upper-case letters as follows:

0 +----+----+
. | NW | NE |
5 +----+----+
. | SW | SE |
0 +----+----+
..0....5....0

Author(s)

Stuart Ball, JNCC stuart.ball@jncc.gov.uk

See Also

gridCoords

Examples

1
2
gridRef("TL2998", "sq10km") # Returns TL29
gridRef("TL29", "sq1km") # Returns NULL - you cannot get a 1km from a 10km!