decimalToDms {enmSdmX} | R Documentation |
Convert geographic coordinates in decimal format to degrees-minutes-second
Description
This function converts geographic coordinates in decimal format to degrees-minutes-seconds (DD-MM-SS) format.
Usage
decimalToDms(x)
Arguments
x |
Numeric or vector of numeric values, longitude or latitude in decimal format. |
Value
A numeric matrix with three columns: degrees, seconds, and seconds. Note that the hemisphere (i.e., indicated by the sign of x) is not returned since it could be either north/south or east/west.
Examples
decimalToDms(38.56123) # latitude of St. Louis, Missouri, USA
decimalToDms(90.06521) # longitude of St. Louis, Missouri, USA
[Package enmSdmX version 1.1.6 Index]