Coordinate format conversion
This will convert decimal degrees in to degrees, minutes, seconds.
Install
npm install dms2deg
Usage
var assert = ;var dms2deg = dms2deg;var deg2dms = deg2dms;
Information
from wikipedia
Informally, specifying a geographic location usually means giving the location's latitude and longitude. The numerical values for latitude and longitude can occur in a number of different formats:[2]
- degrees minutes seconds: 40° 26′ 46″ N 79° 58′ 56″ W
- degrees decimal minutes: 40° 26.767′ N 79° 58.933′ W
- decimal degrees: 40.446° N 79.982° W
There are 60 minutes in a degree and 60 seconds in a minute. Then to convert from a degrees minutes seconds format to a decimal degrees format, one may use the formula To convert back from decimal degree format to degrees minutes seconds format,
License
MIT