Vorlage Diskussion:Geoformat
Aus JodWiki
(Unterschied zwischen Versionen)
Zeile 4: | Zeile 4: | ||
IN: {{#var:org}} | IN: {{#var:org}} | ||
− | {{#vardefine:UM1|{{#ifeq:{{#sub:{{#var:org}}|1|1}}|.|{{#replace:{{#var:org}}|{{#sub:{{#var:org}}|0|2}}|0{{#sub:{{#var:org}}|0|1}}.}}|{{#var:org}} }}}} UM1:{{#var:UM1}} | + | {{#vardefine:UM1|{{#ifeq:{{#sub:{{#var:org}}|1|1}}|.|{{#replace:{{#var:org}}|{{#sub:{{#var:org}}|0|2}}|0{{#sub:{{#var:org}}|0|1}}.}}|{{#var:org}} }}}} UM1:{{#var:UM1}} |
− | {{#vardefine:LEN|{{#len:{{#var:UM1}}}}}} LEN:{{#var:LEN}} | + | {{#vardefine:LEN|{{#len:{{#var:UM1}}}}}} LEN:{{#var:LEN}} |
− | {{#vardefine:CON|{{#switch: {{#var:LEN}} | 9 = 0 | 8 = 00 | 7 = 000| 6 = 0000 | 5 = 00000 | 4 = 000000 }}}} CON:{{#var:CON}} | + | {{#vardefine:CON|{{#switch: {{#var:LEN}} | 9 = 0 | 8 = 00 | 7 = 000| 6 = 0000 | 5 = 00000 | 4 = 000000 }}}} CON:{{#var:CON}} |
OUT:{{#replace:{{#var:UM1}}|{{#var:UM1}}|{{#var:UM1}}{{#var:CON}}}} | OUT:{{#replace:{{#var:UM1}}|{{#var:UM1}}|{{#var:UM1}}{{#var:CON}}}} | ||
</noinclude> | </noinclude> |
Aktuelle Version vom 26. März 2014, 14:03 Uhr
ZWECK: Ergänzt geografische Länge/Breite (float-Format) auf 10 Zeichen
Beispiel:
IN: 7.08388 UM1:07.08388 LEN:8 CON:00 OUT:07.0838800