Difference between revisions of "Template:LocFormat"

From BITPlan E-Bike Wiki
Jump to navigation Jump to search
Line 1: Line 1:
 
<noinclude>
 
<noinclude>
Template to format coordinates in decimal degrees with optional transport.
+
Template to format coordinates in decimal degrees without directional indicators.
 
==== Usage ====
 
==== Usage ====
 
<pre>{{LocFormat
 
<pre>{{LocFormat
 
|coordinates
 
|coordinates
 
|format=dd
 
|format=dd
|transport=bike}}</pre>
+
|directional=no}}</pre>
  
 
==== Examples ====
 
==== Examples ====
* Without transport:
+
=== Floats (format=float) ===
{{LocFormat|43° 16' 28.74" N, 2° 1' 16.69" W}}
+
* {{LocFormat|55° 45' 20.83" N, 37° 37' 3.48" W|format=float}}
43.27465, -2.02130
+
55.7557860, -37.6176330
  
* With transport:
+
=== Decimal Degrees (format=dd) ===
{{LocFormat|43° 16' 28.74" N, 2° 1' 16.69" W|transport=train}}
+
* {{LocFormat|55° 45' 20.83" N, 37° 37' 3.48" W|format=dd}}
43.27465, -2.02130:train
+
→ 55.7557860°, -37.6176330°
 +
 
 +
=== Decimal Minutes (format=dm) ===
 +
* {{LocFormat|55° 45' 20.83" N, 37° 37' 3.48" W|format=dm}}
 +
55° 45.3472', -37° 37.0580'
 +
 
 +
=== Degrees Minutes Seconds (format=dms) ===
 +
* {{LocFormat|55° 45' 20.83" N, 37° 37' 3.48" W|format=dms}}
 +
→ 55° 45' 20.83", -37° 37' 3.48"
  
 
[[Category:Template]]
 
[[Category:Template]]
 
</noinclude>
 
</noinclude>
<includeonly>{{#coordinates:{{{1}}}|format={{{format|dd}}}|directional=yes}}{{#if:{{{transport|}}}|:{{{transport|}}}|}}</includeonly>
+
<includeonly>{{#coordinates:{{{1}}}|format={{{format|dd}}}|directional=yes}}</includeonly>

Revision as of 09:44, 19 January 2025

Template to format coordinates in decimal degrees without directional indicators.

Usage

{{LocFormat
|coordinates
|format=dd
|directional=no}}

Examples

Floats (format=float)

55.755786 N, 37.617633 W → 55.7557860, -37.6176330

Decimal Degrees (format=dd)

55.755786° N, 37.617633° W → 55.7557860°, -37.6176330°

Decimal Minutes (format=dm)

55° 45.3472' N, 37° 37.0580' W → 55° 45.3472', -37° 37.0580'

Degrees Minutes Seconds (format=dms)

55° 45' 20.83" N, 37° 37' 3.48" W → 55° 45' 20.83", -37° 37' 3.48"