Difference between revisions of "Template:Decdeg/doc"

From blackwiki
Jump to navigation Jump to search
imported>Droll
(added info on use with unnamed params)
imported>کاشف عقیل
Line 167: Line 167:
  
 
[[ja:Template:Decdeg]]
 
[[ja:Template:Decdeg]]
 +
[[ur:سانچہ:Decdeg]]
 
</includeonly>
 
</includeonly>

Revision as of 17:49, 21 July 2010

Purpose

Provides an easy way to convert geographic coordinates from most formats to Decimal Degrees. It is primarily intended to work as a sub-template when building infoboxes.

Usage

The template can be use with named or unnamed parameters as shown.

Fields Description
{{decdeg
| deg = 
| min =
| sec = 
| hem = 
| rnd =
}}
 
Degrees
Minutes
Seconds
Hemisphere
Round
 
{{decdeg|deg|min|sec|hem|rnd}}

Input degrees can be signed in which case the hemisphere is not required. A negative value implies a value in the western or southern hemisphere. Minutes and seconds need not be specified. If no degrees are specified then a value of zero is assumed. This template does not attempt to trap invalid values and results in this case will be undefined.

If |rnd= is not specified then the default value is |rnd=7.

Examples

Wiki markup

{{decdeg
| deg = 37
| min = 51
| sec = 00
| hem = N
}}, 
{{decdeg
| deg = 119
| min = 34
| sec = 04
| hem = W
}}

produces:

37.85, -119.5677778

Wiki markup

{{decdeg
| deg = 37
| min = 51
| hem = N
}}, 
{{decdeg
| deg = 119
| min = 34
| hem = W
}}

produces:

37.85, -119.5666667

Wiki markup

{{decdeg
| deg = 37
| min = 51
| sec = 00
| rnd = 8
}}, 
{{decdeg
| deg = -119
| min = 34
| sec = 04
| rnd = 8
}}

produces:

37.85, -119.56777778

Wiki markup

{{decdeg|37|51|00|N}},
{{decdeg|119|34|04|W}}

produces:

37.85, -119.5677778

Wiki markup

{{decdeg|37.85}},
{{decdeg|-119.5677778}}

produces:

37.85, -119.5677778


See also