Razlika između inačica stranice »Predložak:Decdeg«
(Bot: Automatski unos stranica) |
m (bnz) |
||
Redak 1: | Redak 1: | ||
<includeonly>{{#expr: ( | |||
{{#switch: {{{hem|{{{4|}}}}}} | {{#switch: {{{hem|{{{4|}}}}}} | ||
| W|w|S|s = -1 | | W|w|S|s = -1 |
Trenutačna izmjena od 14:35, 2. travnja 2022.
This helper template provides a way to convert geographic coordinates from degree, minute, second format to decimal degrees. It is intended for use in building infobox templates. UsageThe template can be used with named or unnamed parameters as shown.
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 might be undefined. The decimal precision of the result is determined by the value assigned rnd, which defaults to 7. Currently this template does not attempt to trap invalid values. Examples
When using unnamed parameters, the hemisphere must be the fourth parameter:
Input can be signed or unsigned decimal degrees:
When using rounding, the factor must be the fifth parameter:
If a value is undefined then zero is assumed:
Negative zero values are accommodated:
See also |