

DMSString
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 all close allBasic Examples (2)
Scope (4)
Convert a DMS list into a DMS string:
For exact input, the result also contains exact numbers:
By default, DMSString ignores signs:
They can be kept by using cardinal directions, either for latitude ("NS") or for longitude ("EW"):
Convert a numeric angle in degrees into a DMS string:
By default, DMSString produces numbers with three decimals for seconds:
The number of digits can be decreased or increased:
The precision parameter only affects the results of inexact inputs:
Generalizations & Extensions (3)
On DMS strings, DMSString returns a canonical form:
The choice of cardinal direction is still free:
Act on a GeoPosition object, returning a pair "lat long":
Convert a Quantity angle into a DMS string:
Properties & Relations (3)
If the input contains any 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 DMSString on a DMS list can be inverted with DMSList:
The action of DMSString on a numeric angle in degrees can be inverted with FromDMS:
With exact numbers, DMSString returns a numerical approximation:
Hence the original exact number cannot be directly recovered:
See Also
DMSList FromDMS LatitudeLongitude Degree GeodesyData GeoPosition GeoDistance
Function Repository: GeneralizedDMSString
Text
Wolfram Research (2008), DMSString, Wolfram Language function, https://reference.wolfram.com/language/ref/DMSString.html (updated 2014).
CMS
Wolfram Language. 2008. "DMSString." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2014. https://reference.wolfram.com/language/ref/DMSString.html.
APA
Wolfram Language. (2008). DMSString. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/DMSString.html
BibTeX
@misc{reference.wolfram_2025_dmsstring, author="Wolfram Research", title="{DMSString}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/DMSString.html}", note=[Accessed: 08-August-2025]}
BibLaTeX
@online{reference.wolfram_2025_dmsstring, organization={Wolfram Research}, title={DMSString}, year={2014}, url={https://reference.wolfram.com/language/ref/DMSString.html}, note=[Accessed: 08-August-2025]}