sgo_bng_ngr {sgo} | R 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 |
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
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.