FromDMS

FromDMS[{d,m,s}]
converts from degrees, minutes, and seconds to decimal degrees.

FromDMS["dms"]
converts from a DMS string to decimal degrees.

FromDMS["latlon"]
converts from a latitude-longitude string to latitude and longitude in decimal degrees.

DetailsDetails

  • FromDMS["dms"] supports all common DMS string formats, with delimiters such as , , , and , , .
  • FromDMS["dms"] allows strings containing cardinal directions N, , E, . N and E give positive angles; and give negative angles.
  • FromDMS["latlon"] supports latitude-longitude formats, with or without cardinal directions explicitly specified.
  • Results in decimal degrees can be converted to radians by multiplying by Degree.

ExamplesExamplesopen allclose all

Basic Examples  (4)Basic Examples  (4)

Convert from a DMS list to an angle in decimal degrees:

In[1]:=
Click for copyable input
Out[1]=

Convert from a DMS string:

In[1]:=
Click for copyable input
Out[1]=

Convert from a DMS string with cardinal directions:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=

Convert from a latitude-longitude specification:

In[1]:=
Click for copyable input
Out[1]=
Introduced in 2008
(7.0)