1.0.0 • Published 9 years ago

nnng v1.0.0

Weekly downloads
4
License
MIT
Repository
github
Last release
9 years ago

nnng

“No! Not National Grid!”

Coordinate transformation between OSGB36 and WGS84 in JavaScript. Uses the Proj4js library.

Usage

$ npm install --save nnng

Example

var nnng = require("nnng");

nnng.from(651409, 313177);
// [ 52.65797660129558, 1.716038442825891 ]

nnng.to(52.6579, 1.71603);
// [ 651408.871587621, 313168.4539022284 ]

Documentation

nnng.from(x, y)

Takes an OSGB36 grid reference, or northing/easting. Returns a WGS84 longitude/latitude.

nnng.to(lon, lat)

Takes a WGS84 longitude/latitude. Returns an OSGB36 grid reference, or northing/easting.

About

Made by Miëtek Bak. Published under the MIT X11 license.