قالب:Decdeg
هذا مساعدة:قالب مصمم على نحو معقد. ينصح بتجربة التعديلات في الملعب أوَّلًا. |
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