gridCoords: Get x,y coordinates from a grid reference

View source: R/gridCoords.R

gridCoordsR Documentation

Get x,y coordinates from a grid reference

Description

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.

Usage

gridCoords(grid = NULL, units = c("km", "m"))

Arguments

grid

an OSGB or OSNI grid reference string

units

metres or kilometres (default)

Value

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

Author(s)

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

See Also

gridRef

Examples

gridCoords("NZ1265") # returns x=412, y=565 (in km)
gridCoords("NZ123654", units="m") # returns x=412300, y=565400 (in m)


ropensci/rnbn documentation built on May 18, 2022, 6:42 p.m.