ropensci / parzer

Parse geographic coordinates
https://docs.ropensci.org/parzer
Other
63 stars 6 forks source link

fxns for getting parts of coordinates #8

Closed sckott closed 5 years ago

sckott commented 5 years ago

parsing

fxns to parse out different pieces of a coordinate value

x = 40.123
degrees(x) # => 40
minutes(x) # => 7
seconds(x) # => 22.8

x = "N 39 21.440"
hdm(x) # => 39.35733

x = "N 39 21 4"
hdms(x) # => 39.35111

x = "39 21 4 W"
dmsh(x) # => -39.35111