sgo_bng_ngr | R Documentation |
Converts BNG Easting/Northing coordinates to National Grid References
sgo_bng_ngr(x, digits = 10)
x |
A |
digits |
Numeric. It defines the precision of the resulting grid references. |
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.
A list with at least one column named 'ngr'.
sgo_points
, sgo_ngr_bng
.
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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.