WOLFRAM

DMSList[θ]

converts an angle θ given in decimal degrees to a DMS list {degree,minute,second}.

DMSList["dms"]

converts a DMS string to a DMS list {degree,minute,second}.

DMSList["latlon"]

converts a latitude-longitude string to a pair of DMS lists.

converts GeoPosition data to a pair or array of pairs of DMS lists.

Details

  • DMSList["dms"] supports all common DMS string formats, with delimiters such as °, ', ", and d, m, s.
  • DMSList[{d,m,s}] returns a canonicalized degrees-minutes-seconds list with minute and second values between 0 and 60.
  • For a positive angle θ, DMSList[θ] returns a list of non-negative numbers. For a negative angle θ, DMSList[θ] returns a list of nonpositive numbers.
  • For a negative angle θ, DMSList[θ] is equivalent to -DMSList[-θ].

Examples

open allclose all

Basic Examples  (4)Summary of the most common use cases

Convert an angle given in decimal degrees to {degree,minute,second}:

Out[1]=1

Convert from a string:

Out[1]=1

This canonicalizes a DMS list:

Out[1]=1

Return the DMS lists of latitude and longitude of a GeoPosition object:

Out[1]=1
Out[2]=2

Scope  (6)Survey of the scope of standard use cases

DMS list form of an angle given in decimal degrees:

Out[1]=1

For exact inputs, the result is also a list of exact quantities:

Out[2]=2

A negative angle:

Out[3]=3

DMS list of an angle given as a DMS string:

Out[1]=1

The input can be given in multiple forms:

Out[2]=2
Out[3]=3
Out[4]=4
Out[5]=5

Signs in a DMS string can be specified using "North", "West", etc. or abbreviations like "N", "W", etc.:

Out[1]=1
Out[2]=2
Out[3]=3

The sign of the angle can also be explicit in the string, and it applies to all elements:

Out[4]=4
Out[5]=5
Out[6]=6

Canonical DMS list input is returned without change:

Out[1]=1

Degrees and minutes are always returned as exact numbers:

Out[2]=2

Canonicalize to a unique form:

Out[3]=3

An incomplete specification of a DMS string assumes zeros:

Out[1]=1
Out[2]=2
Out[3]=3

Return the array of pairs of DMS lists for the locations in a GeoPosition array:

Out[2]=2
Out[3]=3

Generalizations & Extensions  (2)Generalized and extended use cases

Act on both angles of a double DMS string:

Out[1]=1

The angles are returned in {lat,lon} form even if provided in reverse order:

Out[2]=2

Specify explicitly the meaning of each angle:

Out[3]=3
Out[4]=4

Convert a Quantity angle into a DMS list:

Out[1]=1

Properties & Relations  (8)Properties of the function, and connections to other functions

For a positive angle θ, DMSList[θ] returns a list of non-negative numbers:

Out[1]=1

For a negative angle θ, DMSList[θ] returns a list of non-positive numbers:

Out[2]=2

All numeric angles θ obey the identity DMSList[-θ]-DMSList[θ]:

Out[1]=1

DMSList does not implement 360-degree periodicity:

Out[1]=1

If the input contains an inexact number, the result will be inexact, always in the seconds:

Out[1]=1
Out[2]=2

Only when all numbers are exact will the result be exact:

Out[3]=3
Out[4]=4

The action of DMSList on a numeric angle can be inverted with FromDMS:

Out[1]=1
Out[2]=2

With an exact number:

Out[3]=3
Out[4]=4

The action of DMSList on a DMS string angle can be inverted with DMSString:

Out[1]=1
Out[2]=2

With an exact number:

Out[3]=3
Out[4]=4

DMS lists of numeric angles can also be computed with NumberDecompose:

Out[1]=1
Out[2]=2

DMSList and NumberDecompose follow the same sign conventions:

Out[3]=3
Out[4]=4

DMS lists are equivalent to Quantity objects with degree-minute-second mixed units:

Out[2]=2

DMSList can extract the DMS list from the Quantity object:

Out[3]=3

The list can be used as mixed magnitude for the quantity:

Out[4]=4

Possible Issues  (2)Common pitfalls and unexpected behavior

There must always be numbers accompanying the units:

Out[1]=1
Out[2]=2

Rational numbers should not be used:

Out[1]=1
Wolfram Research (2008), DMSList, Wolfram Language function, https://reference.wolfram.com/language/ref/DMSList.html (updated 2020).
Wolfram Research (2008), DMSList, Wolfram Language function, https://reference.wolfram.com/language/ref/DMSList.html (updated 2020).

Text

Wolfram Research (2008), DMSList, Wolfram Language function, https://reference.wolfram.com/language/ref/DMSList.html (updated 2020).

Wolfram Research (2008), DMSList, Wolfram Language function, https://reference.wolfram.com/language/ref/DMSList.html (updated 2020).

CMS

Wolfram Language. 2008. "DMSList." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2020. https://reference.wolfram.com/language/ref/DMSList.html.

Wolfram Language. 2008. "DMSList." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2020. https://reference.wolfram.com/language/ref/DMSList.html.

APA

Wolfram Language. (2008). DMSList. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/DMSList.html

Wolfram Language. (2008). DMSList. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/DMSList.html

BibTeX

@misc{reference.wolfram_2025_dmslist, author="Wolfram Research", title="{DMSList}", year="2020", howpublished="\url{https://reference.wolfram.com/language/ref/DMSList.html}", note=[Accessed: 31-May-2025 ]}

@misc{reference.wolfram_2025_dmslist, author="Wolfram Research", title="{DMSList}", year="2020", howpublished="\url{https://reference.wolfram.com/language/ref/DMSList.html}", note=[Accessed: 31-May-2025 ]}

BibLaTeX

@online{reference.wolfram_2025_dmslist, organization={Wolfram Research}, title={DMSList}, year={2020}, url={https://reference.wolfram.com/language/ref/DMSList.html}, note=[Accessed: 31-May-2025 ]}

@online{reference.wolfram_2025_dmslist, organization={Wolfram Research}, title={DMSList}, year={2020}, url={https://reference.wolfram.com/language/ref/DMSList.html}, note=[Accessed: 31-May-2025 ]}