1.0.0 • Published 8 years ago
coord-convert v1.0.0
coord-convert-dm-decimal
A small library that convert one part of geographical coordinates from degree minutes format to decimal format and vice versa. More conversions to follow.
Installation
npm install coord-convert
Usage
import
var convert = require('../script');
from DM to decimal
var convertedCoordinates = convert.convertDMtoDecimal('E007° 00.165');
from decimal latitude to DM
var convertedCoordinates = convert.convertDecimaltoDMLat(51.23485834);
from decimal longitude to DM
var convertedCoordinates = convert.convertDecimaltoDMLng(7.445273);
Example Input values:
E007° 00.165N51° 25.322W013° 05.258S050° 23.74851.234858347.445273Returns
nullif coordinate is not properly formatted.
Tests
npm test
Changelog
1.0.0
Added Decimal to DM functions
0.0.1
Implemented convert from DM to Decimal
Contributing
In lieu of a formal style guide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code.