Predložak:Decdeg: razlika između inačica
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 |
Posljednja izmjena od 2. travanj 2022. u 14:35
{{#ifexist:Predložak:Decdeg/doc| {{#switch: eng | alb = | boš = | cg = | češ = | eng = | fra = | tal = | mađ = | nje = | por = | rus = | srp = | špa = | šve = | slo = |
}}{{#invoke:Category handler|main|draft={{SAFESUBST:#invoke:Unsubst||$B= {{#invoke:Category handler|main}}}}}} {{#ifeq:decdeg |doc |
{{#ifeq:show |show |
}}}} }}{{#if: | |
{{#invoke:Category handler|main|draft={{SAFESUBST:#invoke:Unsubst||$B=
{{#invoke:Category handler|main}}
{{#ifexist:Predložak:Decdeg | main}} |
}} }} |
}} 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. Usage[uredi]The 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[uredi]
{{#switch: N |
w|S|s = -1 | e|N|n = 1 | - | -1 | 1 }}
}} * ( {{#if:37|abs37|0}} + {{#if:51|abs51/60|0}} + {{#if:00|abs00/3600|0}} ) ) round {{#if: | | 7 }} }}
{{#switch: W |
w|S|s = -1 | e|N|n = 1 | - | -1 | 1 }}
}} * ( {{#if:119|abs119|0}} + {{#if:34|abs34/60|0}} + {{#if:04|abs04/3600|0}} ) ) round {{#if: | | 7 }} }} When using unnamed parameters, the hemisphere must be the fourth parameter:
{{#switch: N |
w|S|s = -1 | e|N|n = 1 | - | -1 | 1 }}
}} * ( {{#if:37|abs37|0}} + {{#if:51|abs51/60|0}} + {{#if:|abs/3600|0}} ) ) round {{#if: | | 7 }} }}
{{#switch: W |
w|S|s = -1 | e|N|n = 1 | - | -1 | 1 }}
}} * ( {{#if:119|abs119|0}} + {{#if:34|abs34/60|0}} + {{#if:|abs/3600|0}} ) ) round {{#if: | | 7 }} }} Input can be signed or unsigned decimal degrees:
{{#switch: N |
w|S|s = -1 | e|N|n = 1 | - | -1 | 1 }}
}} * ( {{#if:37.85|abs37.85|0}} + {{#if:|abs/60|0}} + {{#if:|abs/3600|0}} ) ) round {{#if: | | 7 }} }}
{{#switch: W |
w|S|s = -1 | e|N|n = 1 | - | -1 | 1 }}
}} * ( {{#if:119.5666667|abs119.5666667|0}} + {{#if:|abs/60|0}} + {{#if:|abs/3600|0}} ) ) round {{#if: | | 7 }} }}
{{#switch: |
w|S|s = -1 | e|N|n = 1 | - | -1 | 1 }}
}} * ( {{#if:37.85|abs37.85|0}} + {{#if:|abs{{{2}}}/60|0}} + {{#if:|abs{{{3}}}/3600|0}} ) ) round {{#if: | | 7 }} }}
{{#switch: |
w|S|s = -1 | e|N|n = 1 | - | -1 | 1 }}
}} * ( {{#if:-119.5666667|abs-119.5666667|0}} + {{#if:|abs{{{2}}}/60|0}} + {{#if:|abs{{{3}}}/3600|0}} ) ) round {{#if: | | 7 }} }} When using rounding, the factor must be the fifth parameter:
{{#switch: |
w|S|s = -1 | e|N|n = 1 | - | -1 | 1 }}
}} * ( {{#if:37.85|abs37.85|0}} + {{#if:|abs/60|0}} + {{#if:|abs/3600|0}} ) ) round {{#if: 1 | 1 | 7 }} }}
{{#switch: |
w|S|s = -1 | e|N|n = 1 | - | -1 | 1 }}
}} * ( {{#if:-119.5666667|abs-119.5666667|0}} + {{#if:|abs/60|0}} + {{#if:|abs/3600|0}} ) ) round {{#if: 1 | 1 | 7 }} }} If a value is undefined then zero is assumed:
{{#switch: N |
w|S|s = -1 | e|N|n = 1 | - | -1 | 1 }}
}} * ( {{#if:|abs|0}} + {{#if:51|abs51/60|0}} + {{#if:|abs/3600|0}} ) ) round {{#if: | | 7 }} }}
{{#switch: W |
w|S|s = -1 | e|N|n = 1 | - | -1 | 1 }}
}} * ( {{#if:|abs|0}} + {{#if:34|abs34/60|0}} + {{#if:|abs/3600|0}} ) ) round {{#if: | | 7 }} }} Negative zero values are accommodated:
{{#switch: N |
w|S|s = -1 | e|N|n = 1 | - | -1 | 1 }}
}} * ( {{#if:|abs|0}} + {{#if:51|abs51/60|0}} + {{#if:|abs/3600|0}} ) ) round {{#if: | | 7 }} }}
{{#switch: |
w|S|s = -1 | e|N|n = 1 | - | -1 | 1 }}
}} * ( {{#if:-0|abs-0|0}} + {{#if:34|abs34/60|0}} + {{#if:|abs{{{3}}}/3600|0}} ) ) round {{#if: | | 7 }} }} See also[uredi]
|
- Potreban prijevod s albanskog jezika
- Potreban prijevod s bošnjačkog jezika
- Potreban prijevod s crnogorskog jezika
- Potreban prijevod s češkog jezika
- Potreban prijevod s engleskog jezika
- Potreban prijevod s francuskog jezika
- Potreban prijevod s talijanskog jezika
- Potreban prijevod s mađarskog jezika
- Potreban prijevod s njemačkog jezika
- Potreban prijevod s portugalskog jezika
- Potreban prijevod s ruskog jezika
- Potreban prijevod sa srpskog jezika
- Potreban prijevod sa španjolskog jezika
- Potreban prijevod sa švedskog jezika
- Potreban prijevod sa slovenskog jezika
- Potreban prijevod
- Članci predloženi za brisanje