Learn R Programming

rnrfa (version 0.3.0)

OSGParse: Converts UK National Grid Reference to easting/northing coordinates (epsg:27700).

Description

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

Usage

OSGParse(gridRef)

Arguments

gridRef
This is a string that expresses the UK Grid Reference.

Value

  • vector made of two elements: the easting and northing coordinates.

References

This function is based on the following post: http://stackoverflow.com/questions/23017053/how-to-convert-uk-grid-reference-to-latitude-and-longitude-in-r/23023744?noredirect=1#23023744

Examples

Run this code
# single entry
OSGParse("TQ722213")

# multiple entries
OSGParse(c("SN831869","SN829838","SN824853","SN824842","SN826854"))

Run the code above in your browser using DataLab