New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

mt-coordtransform

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mt-coordtransform

Coordinate transformations between latitude/longitude WGS84 and OSGB36.

latest
Source
npmnpm
Version
0.1.0
Version published
Weekly downloads
7
16.67%
Maintainers
1
Weekly downloads
 
Created
Source

mt-coordtransform

Coordinate transformations between latitude/longitude WGS84 and OSGB36.

Installation

$ npm install mt-coordtransform

Usage

The module contains methods for transforming latitude/longitude coordinates between WGS84 (generally used by GPS systems or any world-wide reference system) and OSGB36 (used in all Ordnance Survey mapping).

var LatLon = require('mt-latlon');
var CoordTransform = require('mt-coordtransform');

var pointWGS84 = new LatLon(51.5136, 0.0);
var pointOSGB36 = CoordTransform.convertWGS84toOSGB36(pointWGS84);

The available methods of the CoordTransform module object is listed below.

CoordTransform.convertOSGB36toWGS84(pointOSGB36)

Convert latitude/longitude point in OSGB36 to WGS84.

  • pointOSGB36 (LatLon) latitude/longitude in OSGB36 reference frame
var pointOSGB36 = new LatLon(51.5136, 0.0);
var pointWGS84 = CoordTransform.convertOSGB36toWGS84(pointOSGB36);
// => 51°30′51″N, 000°00′06″W (as LatLon object)

CoordTransform.convertWGS84toOSGB36(pointWGS84)

Convert latitude/longitude point in WGS84 to OSGB36.

  • pointWGS84 (LatLon) latitude/longitude in WGS84 reference frame
var pointWGS84 = new LatLon(51.5136, 0.0);
var pointOSGB36 = CoordTransform.convertWGS84toOSGB36(pointWGS84);
// => 51°30′47″N, 000°00′06″E (as LatLon object)

CoordTransform.convertEllipsoid(point, e1, t, e2)

Convert latitude/longitude from one ellipsoidal model to another.

q.v. Ordnance Survey 'A guide to coordinate systems in Great Britain' Section 6 (www.ordnancesurvey.co.uk/oswebsite/gps/docs/A_Guide_to_Coordinate_Systems_in_Great_Britain.pdf)

  • point (LatLon) latitude/longitude in source reference frame
  • e1 (number[]) source ellipse parameters
  • t (number[]) Helmert transform parameters
  • e2 (number[]) target ellipse parameters

Further information

Please visit www.movable-type.co.uk/scripts/latlong-convert-coords.html for more information on conversion between WGS84 and OGSB36 systems.

The original code was written by Chris Veness and can be found at www.movable-type.co.uk/scripts/latlong-convert-coords.html. It is released under the simple Creative Commons attribution license (http://creativecommons.org/licenses/by/3.0/).

This project is released under the MIT license.

Keywords

osgb36

FAQs

Package last updated on 09 Apr 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts