|
|
Zeile 1: |
Zeile 1: |
| <onlyinclude><!--{{#if:{{{label|}}}|DMS: }} | | <onlyinclude><includeonly><span title="Breitengrad">{{#ifexpr: {{{round}}} < -2 |
| --><span title="Breitengrad">{{#if:{{{sortkey|}}}|{{#ifexpr:abs {{{NS|0}}}<10|0}}}}{{#ifexpr:(0{{{dim|}}})>500000
| | | {{#expr:trunc abs({{{NS}}} round 0)}}° |
| |{{#expr:abs({{{NS|0}}} round 0) mod 180}}° | | | {{#ifexpr: {{{round}}} < 0 |
| |{{#ifexpr:(0{{{dim|}}})> 10000 | | | {{#expr:trunc( abs(60*{{{NS}}} round 0) / 60)}}° {{#expr:abs(60*{{{NS}}} round 0) mod 60}}′ |
| |{{#expr:abs(60*{{{NS|0}}} round 0)/60 mod 180}}° {{#if:{{{sortkey|}}} | | | {{#expr:trunc( abs(3600*{{{NS}}} round {{{round}}}) / 3600)}}° {{#expr:abs(3600*{{{NS}}} round {{{round}}}) / 60 mod 60}}′ {{formatnum: {{#expr:(abs(360000*{{{NS}}} round {{{round}}}-2) mod 6000 ) / 100 }} }}″ |
| |{{#ifexpr:10 > abs(60*{{{NS|0}}} round 0) mod 60|0}}}}{{#expr:abs(60*{{{NS|0}}} round 0) mod 60}}′
| | }} |
| |{{#expr:abs(3600*{{{NS|0}}} round
| | }}{{#ifexpr: {{{NS}}} < 0 |
| (2-2*((1{{{dim|}}})=1)-((0{{{dim|}}})>250)-((0{{{dim|}}})>25)))/3600 mod 180}}° {{#if:{{{sortkey|}}}
| | | <abbr title="Süd">S</abbr> |
| |{{#ifexpr:10 > abs(3600*{{{NS|0}}} round
| | | <abbr title="Nord">N</abbr> |
| (2-2*((1{{{dim|}}})=1)-((0{{{dim|}}})>250)-((0{{{dim|}}})>25)))/60 mod 60|0}}}}<!-- | | }}</span>{{#ifexpr:abs({{{NS}}})<90<!-- sonst Pol ohne Längengrad --> |
| -->{{#expr:abs(3600*{{{NS|0}}} round | | |, <span title="Längengrad">{{#ifexpr: {{{round}}} < -2 |
| (2-2*((1{{{dim|}}})=1)-((0{{{dim|}}})>250)-((0{{{dim|}}})>25)))/60 mod 60}}′ {{#if:{{{sortkey|}}}
| | | {{#expr:trunc abs({{{EW}}} round 0)}}° |
| |{{#ifexpr:10 > abs(360000*{{{NS|0}}} round | | | {{#ifexpr: {{{round}}} < 0 |
| ( -2*((1{{{dim|}}})=1)-((0{{{dim|}}})>250)-((0{{{dim|}}})>25))) mod 6000 div 100|0}}}}<!--
| | | {{#expr:trunc( abs(60*{{{EW}}} round 0) / 60)}}° {{#expr:abs(60*{{{EW}}} round 0) mod 60}}′ |
| -->{{formatnum:{{#expr:abs(360000*{{{NS|0}}} round
| | | {{#expr:trunc( abs(3600*{{{EW}}} round {{{round}}}) / 3600)}}° {{#expr:abs(3600*{{{EW}}} round {{{round}}}) / 60 mod 60}}′ {{formatnum: {{#expr:(abs(360000*{{{EW}}} round {{{round}}}-2) mod 6000 ) / 100 }} }}″ |
| ( -2*((1{{{dim|}}})=1)-((0{{{dim|}}})>250)-((0{{{dim|}}})>25))) mod 6000 div 100}}}}{{#if:{{{sortkey|}}}{{#switch:{{#expr:( -2*((1{{{dim|}}})=1)-((0{{{dim|}}})>250)-((0{{{dim|}}})>25))}}
| | }} |
| |0|-0={{#ifexpr:0=abs(360000*{{{NS|0}}} round
| | }}{{#ifexpr: {{{EW}}} < 0 |
| ( -2*((1{{{dim|}}})=1)-((0{{{dim|}}})>250)-((0{{{dim|}}})>25))) mod 100|,0}}{{#ifexpr:0=abs(360000*{{{NS|0}}} round | | | <abbr title="West">W</abbr> |
| ( -2*((1{{{dim|}}})=1)-((0{{{dim|}}})>250)-((0{{{dim|}}})>25))) mod 10|0}} | | | <abbr title="Ost">O</abbr> |
| |-1={{#ifexpr:0=abs(360000*{{{NS|0}}} round | | }}</span> |
| ( -2*((1{{{dim|}}})=1)-((0{{{dim|}}})>250)-((0{{{dim|}}})>25))) mod 100|,0}}
| | }}</includeonly></onlyinclude> |
| }}}}″ | | |
| | {{Coordinate/Formatdoku}}<!-- |
| | |
| | {{{round}}} ist ein #expr-Ausdruck für: |
| | |
| | {{#if: {{{dim}}} |
| | | {{#ifexpr: ({{{dim}}}) > 500000 |
| | | -4 |
| | | {{#ifexpr:({{{dim}}}) > 10000 |
| | | -2 |
| | | {{#ifexpr: {{{dim}}} > 250 |
| | | 0 |
| | | {{#ifexpr: {{{dim}}} > 25 |
| | | 1 |
| | | 2 |
| | }} |
| | }} |
| | }} |
| | }} |
| | | 0 |
| }} | | }} |
| }}{{#ifexpr:({{{NS|0}}})<0|S<!--span title=Süd>S</span-->|N<!--span title=Nord>N</span-->}}</span><!--
| | --> |
| -->{{#ifexpr:abs({{{NS|0}}})<90|, <span title="Längengrad"><!--
| |
| -->{{#if:{{{sortkey|}}}|{{#switch:{{#expr:floor (ln abs {{{EW|0}}} / ln 10)}}|2=|1=0|#default=00}}}}{{#ifexpr:(0{{{dim|}}})>500000
| |
| |{{#expr:abs({{{EW|0}}} round 0) mod 360}}°
| |
| |{{#ifexpr:(0{{{dim|}}})> 10000
| |
| |{{#expr:abs(60*{{{EW|0}}} round 0)/60 mod 360}}° {{#if:{{{sortkey|}}}
| |
| |{{#ifexpr:10 > abs(60*{{{EW|0}}} round 0) mod 60|0}}}}{{#expr:abs(60*{{{EW|0}}} round 0) mod 60}}′
| |
| |{{#expr:abs(3600*{{{EW|0}}} round
| |
| (2-2*((1{{{dim|}}})=1)-((0{{{dim|}}})>250)-((0{{{dim|}}})>25)))/3600 mod 360}}° {{#if:{{{sortkey|}}}
| |
| |{{#ifexpr:10 > abs(3600*{{{EW|0}}} round
| |
| (2-2*((1{{{dim|}}})=1)-((0{{{dim|}}})>250)-((0{{{dim|}}})>25)))/60 mod 60|0}}}}<!--
| |
| -->{{#expr:abs(3600*{{{EW|0}}} round
| |
| (2-2*((1{{{dim|}}})=1)-((0{{{dim|}}})>250)-((0{{{dim|}}})>25)))/60 mod 60}}′ {{#if:{{{sortkey|}}}
| |
| |{{#ifexpr:10 > abs(360000*{{{EW|0}}} round
| |
| ( -2*((1{{{dim|}}})=1)-((0{{{dim|}}})>250)-((0{{{dim|}}})>25))) mod 6000 div 100|0}}}}<!--
| |
| -->{{formatnum:{{#expr:abs(360000*{{{EW|0}}} round
| |
| ( -2*((1{{{dim|}}})=1)-((0{{{dim|}}})>250)-((0{{{dim|}}})>25))) mod 6000 div 100}}}}{{#if:{{{sortkey|}}}{{#switch:{{#expr:( -2*((1{{{dim|}}})=1)-((0{{{dim|}}})>250)-((0{{{dim|}}})>25))}}
| |
| |0|-0={{#ifexpr:0=abs(360000*{{{EW|0}}} round
| |
| ( -2*((1{{{dim|}}})=1)-((0{{{dim|}}})>250)-((0{{{dim|}}})>25))) mod 100|,0}}{{#ifexpr:0=abs(360000*{{{EW|0}}} round
| |
| ( -2*((1{{{dim|}}})=1)-((0{{{dim|}}})>250)-((0{{{dim|}}})>25))) mod 10|0}}
| |
| |-1={{#ifexpr:0=abs(360000*{{{EW|0}}} round
| |
| ( -2*((1{{{dim|}}})=1)-((0{{{dim|}}})>250)-((0{{{dim|}}})>25))) mod 100|,0}}
| |
| }}}}″
| |
| }}
| |
| }}{{#ifexpr:{{{EW|0}}}<0|W<!--span title=West>W</span-->|O<!--span title=Ost>O</span-->}}</span>}}</onlyinclude>{{Dokumentation}}
| |
Diese Vorlage wird nur intern von der Vorlage:Coordinate genutzt. Sie soll nicht direkt eingebunden werden!
Diese Vorlage gibt das unerkannte Format für Tooltips geeignet aus. Die Einbindung erfolgt folgendermaßen:
{{Coordinate to DMS
|label= leer oder gefüllt
|NS = Zahl, Längengrad im WGS84-System
|EW = Zahl, Breitengrad im WGS84-System
|round= Genauigkeit der Darstellung als Zahl von Nachkommastellen. Negative Werte werden als Rundung interpretiert
}}
Siehe auch Vorlage:CoordinateLink#Formate.