geographiclib-dms
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

JavaScript implementation of the DMS routines in GeographicLib

This package is a JavaScript implementation of the DMS (degree, minute, second) handling routines from GeographicLib.

Prior to version 2.0.0, this was a component of the node package geographiclib. As of version 2.0.0, that package was split into the packages geographiclib-geodesic and geographiclib-dms (this package). geographiclib will be deprecated on 2023-05-01.

Licensed under the MIT/X11 License; see LICENSE.txt.

Installation

$ npm install geographiclib-dms

Usage

In node, do

var DMS = require("geographiclib-dms");

Documentation

Full documentation is provided at https://geographiclib.sourceforge.io/JavaScript/doc.

Examples

var DMS = require("geographiclib-dms"),
    ang = DMS.Decode("127:54:3.123123W");
console.log("Azimuth " +
  DMS.Encode(ang.val, DMS.MINUTE, 7, ang.ind) +
  " = " + ang.val.toFixed(9));
// This prints "Azimuth 127°54.0520521'W = -127.900867534"

Authors

Package Sidebar

Install

npm i geographiclib-dms

Weekly Downloads

37

Version

2.0.0

License

MIT

Unpacked Size

65.6 kB

Total Files

8

Last publish

Collaborators

  • cffk