sexagesimal
Convert between sexagesimal coordinates and decimal coordinates.
usage
with npm (and/or) browserify
npm install sexagesimal
otherwise
curl https://raw.github.com/mapbox/sexagesimal/master/sexagesimal.js
example
// 66.6 // -66.7 // -66.7 // 66.7 // -66.7sexagesimal // [66, -32]
api
// returns a number or null
dims
is by default NSEW
but can be other ordinal directions expressed
as a string of characters.
sexagesimal // returns [lat, lon] or null
dims
is by default NSEW
but can be other ordinal directions expressed
as a string of characters.
sexagesimal // returns a formatted string
Format a single sexagesimal number. dimension
must be a string, either
"lat"
or "lon"
.
sexagesimal // returns a formatted string
Format a sexagesimal coordinate.