DMSList

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.

DMSList[GeoPosition[]]

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)

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

Convert from a string:

This canonicalizes a DMS list:

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

Scope  (6)

DMS list form of an angle given in decimal degrees:

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

A negative angle:

DMS list of an angle given as a DMS string:

The input can be given in multiple forms:

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

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

Canonical DMS list input is returned without change:

Degrees and minutes are always returned as exact numbers:

Canonicalize to a unique form:

An incomplete specification of a DMS string assumes zeros:

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

Generalizations & Extensions  (2)

Act on both angles of a double DMS string:

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

Specify explicitly the meaning of each angle:

Convert a Quantity angle into a DMS list:

Properties & Relations  (8)

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

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

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

DMSList does not implement 360-degree periodicity:

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

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

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

With an exact number:

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

With an exact number:

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

DMSList and NumberDecompose follow the same sign conventions:

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

DMSList can extract the DMS list from the Quantity object:

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

Possible Issues  (2)

There must always be numbers accompanying the units:

Rational numbers should not be used:

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).

CMS

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

BibTeX

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

BibLaTeX

@online{reference.wolfram_2024_dmslist, organization={Wolfram Research}, title={DMSList}, year={2020}, url={https://reference.wolfram.com/language/ref/DMSList.html}, note=[Accessed: 22-November-2024 ]}