Changes

Jump to navigation Jump to search
add {{documentation subpage}}
{{documentation subpage}}
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:
<table class="wikitable">
<tr><td>d</td><td>Degrees (rounded to integer)</td></tr>
<tr><td>d1</td><td>Degrees (rounded to 0.1 degrees)</td></tr>
<tr><td>dm</td><td>Degrees, minutes (rounded to integer)</td></tr>
<tr><td>dm1</td><td>Degrees, minutes (rounded to 0.1 minutes)</td></tr>
<tr><td>dms</td><td>Degrees, minutes, seconds (rounded to integer)</td></tr>
<tr><td>dms1</td><td>Degrees, minutes, seconds (rounded to 0.1 seconds)</td></tr>
</table>

== Examples ==
{| class="wikitable"
|-
| <code><nowiki>{{Coord/dec2dms|10.391944|N|S|d}}</nowiki></code> || {{Coord/dec2dms|10.391944|N|S|d}}
|-
| <code><nowiki>{{Coord/dec2dms|10.391944|N|S|d1}}</nowiki></code> || {{Coord/dec2dms|10.391944|N|S|d1}}
|-
| <code><nowiki>{{Coord/dec2dms|10.390000|N|S|d}}</nowiki></code> || {{Coord/dec2dms|10.390000|N|S|d}}
|-
| <code><nowiki>{{Coord/dec2dms|10.390000|N|S|d1}}</nowiki></code> || {{Coord/dec2dms|10.390000|N|S|d1}}
|-
| <code><nowiki>{{Coord/dec2dms|10.39|N|S|d}}</nowiki></code> || {{Coord/dec2dms|10.39|N|S|d}}
|-
| <code><nowiki>{{Coord/dec2dms|10.39|N|S|d1}}</nowiki></code> || {{Coord/dec2dms|10.39|N|S|d1}}
|-
| <code><nowiki>{{Coord/dec2dms|-10.391944|N|S|dm}}</nowiki></code> || {{Coord/dec2dms|-10.391944|N|S|dm}}
|-
| <code><nowiki>{{Coord/dec2dms|-10.391944|N|S|dm1}}</nowiki></code> || {{Coord/dec2dms|-10.391944|N|S|dm1}}
|-
| <code><nowiki>{{Coord/dec2dms|10.391944|E|W|dms}}</nowiki></code> || {{Coord/dec2dms|10.391944|E|W|dms}}
|-
| <code><nowiki>{{Coord/dec2dms|10.391944|E|W|dms1}}</nowiki></code> || {{Coord/dec2dms|10.391944|E|W|dms1}}
|-
| <code><nowiki>{{Coord/dec2dms|10|N|S|d}}</nowiki></code> || {{Coord/dec2dms|10|N|S|d}}
|-
| <code><nowiki>{{Coord/dec2dms|10|E|W|dm}}</nowiki></code> || {{Coord/dec2dms|10|E|W|dm}}
|-
| <code><nowiki>{{Coord/dec2dms|-10|E|W|dms}}</nowiki></code> || {{Coord/dec2dms|-10|E|W|dms}}
|-
| <code><nowiki>{{Coord/dec2dms|-10|E|W|dms1}}</nowiki></code> || {{Coord/dec2dms|-10|E|W|dms1}}
|-
|}

{{Coord/dec2dms/subdoc}}

<includeonly>
[[Category:Coord template]]
</includeonly>
Anonymous user

Navigation menu