Learn R Programming

rnrfa (version 0.4.3)

OSGparse: Converts OS Grid Reference to BNG/WGS coordinates.

Description

This function converts an OS reference to easting/northing coordinates (UK National Grid, epsg:27700).

Usage

OSGparse(gridRefs, CoordSystem = "NG")

Arguments

gridRefs
This is a string (or a vector of strings) that expresses the UK Grid Reference.
CoordSystem
This is "NG" (British/Irish National Grid) by default. If you want lat/lon, use CoordSystem = "WGS84" (more info can be found here https://www.epsg-registry.org/).

Value

  • vector made of two elements: the easting and northing (by default) or Lat and Lon coordinates.

Examples

Run this code
# single entry
OSGparse(gridRefs="TQ722213")

# multiple entries
OSGparse(gridRefs=c("SN831869","SN829838"))

Run the code above in your browser using DataLab