DMSString

DMSString[θ]

converts an angle θ given in decimal degrees to a degrees-minutes-seconds string.

DMSString[{ϕ,λ}]

converts latitude and longitude given in decimal degrees to a DMS latitude-longitude string.

DMSString[{d,m,s}]

converts a DMS list to a DMS string.

Details

  • DMSString[θ,"NS"] or DMSString[θ,"EW"] gives a string representation in which the sign of the angle is indicated by one of the cardinal directions "N", "S", "E", or "W".
  • DMSString[{ϕ,λ}] uses "N" for positive ϕ and "E" for positive λ.
  • DMSString[θ,n] uses n-digit precision for seconds. DMSString[θ,{"XY",n}] defines both sign representation and precision.
  • Angles in radians can be converted to degrees for use in DMSString by dividing by Degree.

Examples

open allclose all

Basic Examples  (2)

Convert an angle given in decimal degrees to a DMS string:

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

Convert to a DMS string that specifies one of the cardinal directions:

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

Scope  (4)

Generalizations & Extensions  (3)

Properties & Relations  (3)

See Also

DMSList  FromDMS  LatitudeLongitude  Degree  GeodesyData  GeoPosition  GeoDistance

Introduced in 2008
(7.0)
| Updated in 2014
(10.0)