Template:Coord: Difference between revisions

From Zoophilia Wiki
Jump to navigationJump to search
meta>Quarl
rm dms-lat/dms-long params
meta>Quarl
factor to Template:Coord/dec et al to decrease pre-expand size
Line 1: Line 1:
<includeonly>{{#ifeq:{{{4|}}}|
<includeonly>{{Coord/{{#ifeq:{{{4|}}}|dec
  |{{Coor link
   |{{#if:{{#switch:{{{4}}}{{{8}}}|NE|NW|SE|SW=y}}|dms
  |dms-lat={{coor dec2dms|{{{1}}}|N|S|{{coor/prec dec|{{{1}}}|{{{2}}}}}}}
   |{{#if:{{#switch:{{{3}}}{{{6}}}|NE|NW|SE|SW=y}}|dm
  |dms-long={{coor dec2dms|{{{2}}}|E|W|{{coor/prec dec|{{{1}}}|{{{2}}}}}}}
   |{{#if:{{#switch:{{{2}}}{{{4}}}|NE|NW|SE|SW=y}}|d
  |dec-lat={{{1}}}|dec-long={{{2}}}
  |param={{{1}}}_N_{{{2}}}_E_{{{3|}}}
      }}
   |{{#if:{{#switch:{{{4}}}{{{8}}}|NE|NW|SE|SW=y}}
    |{{Coor link
      |precision=dms
      |dms-lat={{{1}}}°{{{2}}}′{{{3}}}″{{{4}}}
      |dms-long={{{5}}}°{{{6}}}′{{{7}}}″{{{8}}}
      |dec-lat={{coor dms2dec|{{{4}}}|{{{1}}}|{{{2}}}|{{{3}}}}}
      |dec-long={{coor dms2dec|{{{8}}}|{{{5}}}|{{{6}}}|{{{7}}}}}
      |param={{{1}}}_{{{2}}}_{{{3}}}_{{{4}}}_{{{5}}}_{{{6}}}_{{{7}}}_{{{8}}}_{{{9|}}}
      }}
   |{{#if:{{#switch:{{{3}}}{{{6}}}|NE|NW|SE|SW=y}}
    |{{Coor link
      |precision=dm
      |dms-lat={{{1}}}°{{{2}}}′{{{3}}}
      |dms-long={{{4}}}°{{{5}}}′{{{6}}}
      |dec-lat={{coor dms2dec|{{{3}}}|{{{1}}}|{{{2}}}}}
      |dec-long={{coor dms2dec|{{{6}}}|{{{4}}}|{{{5}}}}}
      |param={{{1}}}_{{{2}}}_{{{3}}}_{{{4}}}_{{{5}}}_{{{6}}}_{{{7|}}}
      }}
   |{{#if:{{#switch:{{{2}}}{{{4}}}|NE|NW|SE|SW=y}}
    |{{Coor link
      |precision=d
      |dms-lat={{{1}}}°{{{2}}}
      |dms-long={{{3}}}°{{{4}}}
      |dec-lat={{coor dms2dec|{{{2}}}|{{{1}}}}}
      |dec-long={{coor dms2dec|{{{4}}}|{{{3}}}}}
      |param={{{1}}}_{{{2}}}_{{{3}}}_{{{4}}}_{{{5|}}}
      }}
   |ERROR in &#123;{coord}&#125; invocation
   |ERROR in &#123;{coord}&#125; invocation
   }} }} }} }}</includeonly><noinclude>{{template doc}}</noinclude>
   }}}}}}}}
  |1={{{1|}}}|2={{{2|}}}|3={{{3|}}}|4={{{4|}}}|5={{{5|}}}|6={{{6|}}}|7={{{7|}}}|8={{{8|}}}|9={{{9|}}}
}}</includeonly><noinclude>{{template doc}}</noinclude>

Revision as of 05:55, 7 April 2007