Template:Coord/dec2dms/doc: Difference between revisions

From Saintapedia
Jump to navigation Jump to search
>Tomoneill
(copied from http://en.wikipedia.org/w/index.php?title=Template:Coord/dec2dms/doc&oldid=549196736)
 
m (1 revision imported)
 
(No difference)

Latest revision as of 07:59, 13 September 2024

Given a decimal coordinate, two cardinal directions, and precision, render a coordinate in degrees/minutes/seconds.

Usage

{{coord/dec2dms|coord|N|S|precision}}
{{coord/dec2dms|coord|E|W|precision}}

Precision codes:

dDegrees (rounded to integer)
d1Degrees (rounded to 0.1 degrees)
dmDegrees, minutes (rounded to integer)
dm1Degrees, minutes (rounded to 0.1 minutes)
dmsDegrees, minutes, seconds (rounded to integer)
dms1Degrees, minutes, seconds (rounded to 0.1 seconds)

Examples

{{Coord/dec2dms|10.391944|N|S|d}} Template:Coord/dec2dms/dN
{{Coord/dec2dms|10.391944|N|S|d1}} Template:Coord/dec2dms/d1N
{{Coord/dec2dms|10.390000|N|S|d}} Template:Coord/dec2dms/dN
{{Coord/dec2dms|10.390000|N|S|d1}} Template:Coord/dec2dms/d1N
{{Coord/dec2dms|10.39|N|S|d}} Template:Coord/dec2dms/dN
{{Coord/dec2dms|10.39|N|S|d1}} Template:Coord/dec2dms/d1N
{{Coord/dec2dms|-10.391944|N|S|dm}} Template:Coord/dec2dms/dmS
{{Coord/dec2dms|-10.391944|N|S|dm1}} Template:Coord/dec2dms/dm1S
{{Coord/dec2dms|10.391944|E|W|dms}} 10°23′31″E
{{Coord/dec2dms|10.391944|E|W|dms1}} Template:Coord/dec2dms/dms1E
{{Coord/dec2dms|10|N|S|d}} Template:Coord/dec2dms/dN
{{Coord/dec2dms|10|E|W|dm}} Template:Coord/dec2dms/dmE
{{Coord/dec2dms|-10|E|W|dms}} 10°00′00″W
{{Coord/dec2dms|-10|E|W|dms1}} Template:Coord/dec2dms/dms1W

Template:Coord/dec2dms/subdoc