Difference between revisions of "Template:Coord/dec2dms/doc"

From blackwiki
Jump to navigation Jump to search
imported>Lam-ang
m (Removed 5 sitelink(s) migrated to an item on Wikidata)
imported>Certes
m (Closing <tr> tags)
Line 7: Line 7:
 
Precision codes:
 
Precision codes:
 
<table class="wikitable">
 
<table class="wikitable">
<tr><td>d</td><td>Degrees (rounded to integer)</td>
+
<tr><td>d</td><td>Degrees (rounded to integer)</td></tr>
<tr><td>d1</td><td>Degrees (rounded to 0.1 degrees)</td>
+
<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><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><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><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><td>dms1</td><td>Degrees, minutes, seconds (rounded to 0.1 seconds)</td></tr>
 
</table>
 
</table>
  

Revision as of 12:20, 20 March 2018

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}} 10°N
{{Coord/dec2dms|10.391944|N|S|d1}} 10.4°N
{{Coord/dec2dms|10.390000|N|S|d}} 10°N
{{Coord/dec2dms|10.390000|N|S|d1}} 10.4°N
{{Coord/dec2dms|10.39|N|S|d}} 10°N
{{Coord/dec2dms|10.39|N|S|d1}} 10.4°N
{{Coord/dec2dms|-10.391944|N|S|dm}} 10°24′S
{{Coord/dec2dms|-10.391944|N|S|dm1}} 10°23.5′S
{{Coord/dec2dms|10.391944|E|W|dms}} 10°23′31″E
{{Coord/dec2dms|10.391944|E|W|dms1}} 10°23′31.0″E
{{Coord/dec2dms|10|N|S|d}} 10°N
{{Coord/dec2dms|10|E|W|dm}} 10°00′E
{{Coord/dec2dms|-10|E|W|dms}} 10°00′00″W
{{Coord/dec2dms|-10|E|W|dms1}} 10°00′00.0″W

Subroutines

Subroutines of Template:Coord/dec2dms (edit | talk | history | links | watch | logs):