sgo_bng_ngr: BNG Easting/Northing to National Grid References (NGR)

View source: R/sgo_ngr.R

sgo_bng_ngrR Documentation

BNG Easting/Northing to National Grid References (NGR)

Description

Converts BNG Easting/Northing coordinates to National Grid References

Usage

sgo_bng_ngr(x, digits = 10)

Arguments

x

A sgo_points object with coordinates defined as epsg=27700 or epsg=7405.

digits

Numeric. It defines the precision of the resulting grid references.

Details

All resulting grid references will have 10 digits (1m × 1m square) by default. In order to reduce the output precision change the digits parameter accordingly. When digits=0, it returns the numeric format of the grid references.

Note that National Grid references are truncated instead of being rounded when converting to less precise references (as the OS system demands). By doing so, the grid reference refers to the lower left corner of the relevant square - to ensure the more precise polygon will remain within the boundaries of the less precise polygon.

Value

A list with at least one column named 'ngr'.

See Also

sgo_points, sgo_ngr_bng.

Examples

sgo <- sgo_points(list(x=247455, y=706338, name="Ben Venue"),
coords=c("x", "y"), epsg=27700)
grid10 <- sgo_bng_ngr(sgo)
grid8 <- sgo_bng_ngr(sgo, digits=8)
#and notice the truncating, not rounding, of grid8 regarding grid10.

sgo documentation built on Sept. 23, 2022, 5:08 p.m.