gridCoords | R Documentation |
Given an OSGB or OSNI grid reference string, get the x,y coordinates of the
OSGB or OSNI grid for the bottom, left-hand corner of the grid square. The
units
parameter controls the units (metres m
or kilometres
km
) in which the coordinates should be returned.
gridCoords(grid = NULL, units = c("km", "m"))
grid |
an OSGB or OSNI grid reference string |
units |
metres or kilometres (default) |
a list of class "gridref" with the following contents:
grid |
the original grid reference |
system |
the grid reference system, either "OSGB" or "OSNI" |
x |
the x coordinate (easting) in requested units |
y |
the y coordinate (northing)in requested units |
units |
"m" or "km" |
precision |
the prcision of the original grid reference in metres |
Stuart Ball, JNCC stuart.ball@jncc.gov.uk
gridRef
gridCoords("NZ1265") # returns x=412, y=565 (in km) gridCoords("NZ123654", units="m") # returns x=412300, y=565400 (in m)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.