Class: LatLon_OsGridRef

osgridref~LatLon_OsGridRef()

Extends LatLon class with method to convert LatLon point to OS grid reference.

Constructor

new LatLon_OsGridRef()

Source:

Extends

Methods

distanceTo(point) → {number|*}

Direct (simplistic) implementation of Algorithms for geodesics, Charles F F Karney, Journal of Geodesy 2012 (see also Geodesics on an ellipsoid of revolution, Charles F F Karney, 2011 for further explanations). Notable historical background to methods used.
Parameters:
Name Type Description
point
Overrides:
Source:
Returns:
Type
number | *

inverse()

Overrides:
Source:

toOsGrid() → {OsGridRef}

Converts latitude/longitude to Ordnance Survey grid reference easting/northing coordinate.
Source:
Returns:
OS Grid Reference easting/northing.
Type
OsGridRef
Example
const grid = new LatLon(52.65798, 1.71605).toOsGrid(); // TG 51409 13177
  // for conversion of (historical) OSGB36 latitude/longitude point:
  const grid = new LatLon(52.65798, 1.71605).toOsGrid(LatLon.datums.OSGB36);