Module: src/checkGr

Methods

(static) checkGr(gr) → {object}

Given a grid reference (British National Grid, Irish Grid or UTM zone 30N shorthand), check that this is a valid GR. If it is, return an object which includes the GR precision in metres, the prefix and the two-letter projection code. If an invalid grid reference is supplied throws an error.
Parameters:
Name Type Description
gr string the grid reference.
Source:
Returns:
Object of the form {precision: n, prefix: 'prefix', projection: 'code'}.
Type
object