Difference between revisions of "Develop auto tables"

From geofiction
Jump to navigation Jump to search
 
(22 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
==Useful links==
 
==Useful links==
 
*[https://de.wikipedia.org/wiki/Hilfe:Tabellen Hilfe:Tabellen]
 
*[https://de.wikipedia.org/wiki/Hilfe:Tabellen Hilfe:Tabellen]
 +
*correct link:https://overpass.ogf.rent-a-planet.com/api/interpreter?data
 
*[[Template:MER-autoTable rfrsh]]
 
*[[Template:MER-autoTable rfrsh]]
 
*[[Template:Table_rel]]
 
*[[Template:Table_rel]]
 
*[[Template:Table_opq]]
 
*[[Template:Table_opq]]
*[[Template:Rel_data]]
+
*[[List of autotables]]
*[[Template:Opq_data]]
 
*[[Template:Table_fill]]
 
  
==Workin overpass examples==
+
Subtemplates
 +
*[[Template:Atab_relation]]
 +
*[[Template:Atab_ogfquery]]
 +
*[[Template:Atab_thead]]
 +
*[[Template:Atab_table]]
  
correct link:https://overpass.ogf.rent-a-planet.com/api/interpreter?data
+
==Sites for development==
 +
*[[Autotables_working]]
 +
*[[Autotables_test_simple]]
 +
*[[Autotables_modular]]
 +
*[[Autotables_overpass]]
 +
*[[Template:Table324]]
 +
*[[Template:Test_split_table]]
  
<div class="mw-collapsible mw-collapsed">
 
list of airports
 
<div class="mw-collapsible-content">
 
{{#clear_external_data:}}
 
{{#get_web_data:url=https://overpass.ogf.rent-a-planet.com/api/interpreter?data=(area%5Bname%3D%22Guai%22%5D%5B%22admin_level%22%3D%222%22%5D%3B%20)-%3E.a%3B%20relation%5B%22type%22%3D%22waterway%22%5D%5B%22water%22%3D%22river%22%5D%5Bname%5D(area.a)%3Bout%3B
 
|format=xml
 
|order by=/osm/relation/tag[@k='name']/@v DESC
 
|data=
 
relation_id=/osm/relation/@id
 
,name=/osm/relation/tag[@k='name']/@v
 
,distance=/osm/relation/tag[@k='distance']/@v
 
,destination=/osm/relation/tag[@k='destination']/@v
 
,ref=/osm/relation/tag[@k='ref']/@v
 
|use xpath
 
}}
 
{| class="wikitable sortable"
 
! Name
 
! Length<br/>(km)<br>
 
! Drains into
 
{{#for_external_table:<nowiki/>
 
{{!}}-
 
{{!}}[http://opengeofiction.net/relation/{{{relation_id}}} {{{name}}}]
 
{{!}}{{{distance}}}
 
{{!}}[[{{{destination}}}]]
 
}}
 
|}
 
{{#clear_external_data:}}
 
</div></div>{{clear}}
 
  
 +
==Tests==
  
<div class="mw-collapsible mw-collapsed">
+
===Airport codes===
list of rivers
 
<div class="mw-collapsible-content">
 
{{#clear_external_data:}}
 
{{#get_web_data:url=https://overpass.ogf.rent-a-planet.com/api/interpreter?data=(area%5Bname%3D%22Guai%22%5D%5B%22admin_level%22%3D%222%22%5D%3B%20)-%3E.a%3B%20relation%5B%22type%22%3D%22waterway%22%5D%5B%22water%22%3D%22river%22%5D%5Bname%5D(area.a)%3Bout%3B
 
|format=xml
 
|order by=/osm/relation/tag[@k='name']/@v DESC
 
|data=
 
relation_id=/osm/relation/@id
 
,name=/osm/relation/tag[@k='name']/@v
 
,distance=/osm/relation/tag[@k='distance']/@v
 
,destination=/osm/relation/tag[@k='destination']/@v
 
,ref=/osm/relation/tag[@k='ref']/@v
 
|use xpath
 
}}
 
{| class="wikitable sortable"
 
! Name
 
! Length<br/>(km)<br>
 
! Drains into
 
{{#for_external_table:<nowiki/>
 
{{!}}-
 
{{!}}[http://opengeofiction.net/relation/{{{relation_id}}} {{{name}}}]
 
{{!}}{{{distance}}}
 
{{!}}[[{{{destination}}}]]
 
}}
 
|}
 
{{#clear_external_data:}}
 
</div></div>{{clear}}
 
  
 +
https://overpass.opengeofiction.net/api/interpreter?data=(way%5B%22name%22%5D%5B%22iata%22%5D%3B)%3Bout%3B
  
<div class="mw-collapsible mw-collapsed">
+
https://overpass.opengeofiction.net/api/interpreter?data=(area%5B%22admin_level%22%3D%222%22%5D%5Bname~%22^(Merganien%7CWyster)%24%22%5D%3B)-%3E.a%3B(way(area.a)%5B%22name%22%5D%5B%22iata%22%5D%3B)%3Bout%3B
last edits
 
<div class="mw-collapsible-content">
 
::::::::<span class="mw-ui-button" role="button" aria-disabled="false">{{{1|[https://wiki.opengeofiction.net/index.php/OpenGeofiction:Recent_changesets?action=purge&titles=OpenGeofiction:Recent_changesets Refresh]}}}</span>{{#clear_external_data:}}
 
{{#get_web_data:url=https://opengeofiction.net/api/0.6/changesets
 
|format=xml
 
|data=
 
  changeset_id=/osm/changeset/@id
 
,uid=/osm/changeset/@uid
 
,user=/osm/changeset/@user
 
,created_date=/osm/changeset/@created_at
 
<!-- ,comment=/osm/changeset/tag[@k="comment"]/@v -->
 
|use xpath
 
}}
 
{| class="wikitable sortable"
 
! Changeset ID
 
! User ID
 
! User Name
 
! Date and Time
 
{{#display_external_table:template=ExternalDataTest01
 
|data=changeset_id=
 
  changeset_id
 
,uid=uid
 
,user=user
 
,created_date=created_date
 
}}
 
|}
 
</div></div>{{clear}}
 
  
==Simple tables==
+
https://overpass.opengeofiction.net/api/interpreter?data=(area%5Bname%3D%22Merganien%22%5D%5B%22admin_level%22%3D%222%22%5D%3B%20)-%3E.a%3B%20way%5B%22aeroway%22%3D%22aerodrome%22%5D(area.a)%3Bout%3B
{| class="wikitable"
 
! A
 
! B
 
! C
 
{{!}}-
 
{{!}}aaaaaaa
 
{{!}}bbbbbbbbbbbbbbb
 
{{!}}ccccccccccc
 
|}
 
  
{| class="wikitable sortable"
+
https://overpass.opengeofiction.net/api/interpreter?data=(area%5B%22admin_level%22%5D%5Bname~"^(Wyster|Merganien)$"%5D%3B)-%3E.a%3B%20way%5B%22aeroway%22%3D%22aerodrome%22%5D(area.a)%3Bout%3B
! A
 
! B
 
! C
 
{{!}}-
 
{{!}}aaaaaaa
 
{{!}}bbbbbbbbbbbbbbb
 
{{!}}ccccccccccc
 
|}
 
  
 +
area["admin_level"="2"][name~"^(Merganien|Wyster)$"];)->.a;
  
 +
area["admin_level"="2"]["name"="Merganien"];)->.a;
  
 +
https://overpass.opengeofiction.net/api/interpreter?data=(area%5B%22admin_level%22%5D%5Bname~%22%5E(Merganien%7CWyster)%24%22%5D%3B)-%3E.a%3B%3B%20way%5B%22aeroway%22%3D%22aerodrome%22%5D(area.a)%3Bout%3B
  
{{ #If:{{{collapsible|}}} |
+
https://overpass.opengeofiction.net/api/interpreter?data=(area%5B%22admin_level%22%3D%222%22%5D%5Bname%3D%22Merganien%22%5D%3B%20)-%3E.a%3B%20way%5B%22aeroway%22%3D%22aerodrome%22%5D(area.a)%3Bout%3B
{{ #If:{{{collapsed|}}} |
 
{{{!}} class="wikitable sortable mw-collapsible mw-collapsed;" |
 
{{{!}} class="wikitable sortable mw-collapsible" }} |
 
{{{!}} class="wikitable sortable" }} style="text-align:left; width:{{{width|500}}}px;"
 
|-
 
! class="unsortable" style="background:#{{{bgcolor|CCCCFF}}};" {{ #If:{{{column9tag|}}} |
 
colspan="9" | {{ #If:{{{column8tag|}}} |
 
colspan="8" | {{ #If:{{{column7tag|}}} |
 
colspan="7" | {{ #If:{{{column6tag|}}} |
 
colspan="6" | {{ #If:{{{column5tag|}}} |
 
colspan="5" | {{ #If:{{{column4tag|}}} |
 
colspan="4" | {{ #If:{{{column3tag|}}} |
 
colspan="3" | {{ #If:{{{column2tag|}}} |
 
colspan="2" | {{ #If:{{{column1tag|}}} |
 
colspan="1" }} }} }} }} }} }} }} }} }} | {{{topic|Table}}}
 
! class="unsortable" style="background:#{{{bgcolor|CCCCFF}}}; text-align:right; width:50px;" | {{Refresh}}
 
|-
 
{{ #If:{{{column1tag|}}} |
 
{{ #If:{{{column1sort|}}}{{{column1width|}}} |
 
! {{ #If:{{{column1sort|}}} |
 
class="unsortable" }} {{ #If:{{{column1width|}}} |
 
style="width:{{{column1width}}}px;" }} {{!}} | ! }} {{{column1name}}}
 
{{ #If:{{{column2tag|}}} |
 
{{ #If:{{{column2sort|}}}{{{column2width|}}} |
 
! {{ #If:{{{column2sort|}}} |
 
class="unsortable" }} {{ #If:{{{column2width|}}} |
 
style="width:{{{column2width}}}px;" }} {{!}} | ! }} {{{column2name}}}
 
{{ #If:{{{column3tag|}}} |
 
{{ #If:{{{column3sort|}}}{{{column3width|}}} |
 
! {{ #If:{{{column3sort|}}} |
 
class="unsortable" }} {{ #If:{{{column3width|}}} |
 
style="width:{{{column3width}}}px;" }} {{!}} | ! }} {{{column3name}}}
 
{{ #If:{{{column4tag|}}} |
 
{{ #If:{{{column4sort|}}}{{{column4width|}}} |
 
! {{ #If:{{{column4sort|}}} |
 
class="unsortable" }} {{ #If:{{{column4width|}}} |
 
style="width:{{{column4width}}}px;" }} {{!}} | ! }} {{{column4name}}}
 
{{ #If:{{{column5tag|}}} |
 
{{ #If:{{{column5sort|}}}{{{column5width|}}} |
 
! {{ #If:{{{column5sort|}}} |
 
class="unsortable" }} {{ #If:{{{column5width|}}} |
 
style="width:{{{column5width}}}px;" }} {{!}} | ! }} {{{column5name}}}
 
{{ #If:{{{column6tag|}}} |
 
{{ #If:{{{column6sort|}}}{{{column6width|}}} |
 
! {{ #If:{{{column6sort|}}} |
 
class="unsortable" }} {{ #If:{{{column6width|}}} |
 
style="width:{{{column6width}}}px;" }} {{!}} | ! }} {{{column6name}}}
 
{{ #If:{{{column7tag|}}} |
 
{{ #If:{{{column7sort|}}}{{{column7width|}}} |
 
! {{ #If:{{{column7sort|}}} |
 
class="unsortable" }} {{ #If:{{{column7width|}}} |
 
style="width:{{{column7width}}}px;" }} {{!}} | ! }} {{{column7name}}}
 
{{ #If:{{{column8tag|}}} |
 
{{ #If:{{{column8sort|}}}{{{column8width|}}} |
 
! {{ #If:{{{column8sort|}}} |
 
class="unsortable" }} {{ #If:{{{column8width|}}} |
 
style="width:{{{column8width}}}px;" }} {{!}} | ! }} {{{column8name}}}
 
{{ #If:{{{column9tag|}}} |
 
{{ #If:{{{column9sort|}}}{{{column9width|}}} |
 
! {{ #If:{{{column9sort|}}} |
 
class="unsortable" }} {{ #If:{{{column9width|}}} |
 
style="width:{{{column9width}}}px;" }} {{!}} | ! }} {{{column9name}}} }} }} }} }} }} }} }} }} }}
 
! class="unsortable" | Map
 
|-
 
{{#for_external_table:<nowiki/>
 
{{ #If:{{{column1tag|}}} |
 
{{!}} {{ #If:{{{column1link|}}} |
 
[[{{{{{{column1tag|}}}}}}]] | {{{{{{column1tag|}}}}}}
 
}}
 
{{ #If:{{{column2tag|}}} |
 
{{!}} {{ #If:{{{column2link|}}} |
 
[[{{{{{{column2tag|}}}}}}]] | {{{{{{column2tag|}}}}}}
 
}}
 
{{ #If:{{{column3tag|}}} |
 
{{!}} {{ #If:{{{column3link|}}} |
 
[[{{{{{{column3tag|}}}}}}]] | {{{{{{column3tag|}}}}}}
 
}}
 
{{ #If:{{{column4tag|}}} |
 
{{!}} {{ #If:{{{column4link|}}} |
 
[[{{{{{{column4tag|}}}}}}]] | {{{{{{column4tag|}}}}}}
 
}}
 
{{ #If:{{{column5tag|}}} |
 
{{!}} {{ #If:{{{column5link|}}} |
 
[[{{{{{{column5tag|}}}}}}]] | {{{{{{column5tag|}}}}}}
 
}}
 
{{ #If:{{{column6tag|}}} |
 
{{!}} {{ #If:{{{column6link|}}} |
 
[[{{{{{{column6tag|}}}}}}]] | {{{{{{column6tag|}}}}}}
 
}}
 
{{ #If:{{{column7tag|}}} |
 
{{!}} {{ #If:{{{column7link|}}} |
 
[[{{{{{{column7tag|}}}}}}]] | {{{{{{column7tag|}}}}}}
 
}}
 
{{ #If:{{{column8tag|}}} |
 
{{!}} {{ #If:{{{column8link|}}} |
 
[[{{{{{{column8tag|}}}}}}]] | {{{{{{column8tag|}}}}}}
 
}}
 
{{ #If:{{{column9tag|}}} |
 
{{!}} {{ #If:{{{column9link|}}} |
 
[[{{{{{{column9tag|}}}}}}]] | {{{{{{column9tag|}}}}}}
 
}} }} }} }} }} }} }} }} }} }}
 
{{!}} [[File:OGFmapicon.png|18px|link=]] <span class="plainlinks">[https://opengeofiction.net/{{{type}}}/{{{{{{type}}}_id}}} map]</span>
 
{{!}}-
 
}} |}
 
{{#clear_external_data:}}
 
|}
 
  
==Requesting data==
+
https://overpass.opengeofiction.net/api/interpreter?data=(area%5B%22admin_level%22%3D%222%22%5D%5Bname%3D%22Merganien%22%5D%3B)-%3E.a%3B%20way%5B%22aeroway%22%3D%22aerodrome%22%5D(area.a)%3Bout%3B
===Minimal example 1: use a relation===
 
<pre>
 
{{#clear_external_data:}}{{#get_web_data:url=https://opengeofiction.net/api/0.6/relation/312195/full
 
|format=xml
 
|data=
 
way_id=/osm/way/@id
 
,name=/osm/way/tag[@k='name']/@v
 
|use xpath
 
}}
 
{| class="wikitable"
 
! Nane
 
! Link
 
{{!}}-
 
{{#for_external_table:<nowiki/>
 
{{!}}{{{name}}}
 
{{!}}[http://opengeofiction.net/way/{{{way_id}}} click here]
 
{{!}}-
 
}} |}
 
{{#clear_external_data:}}
 
</pre>
 
  
{| {{#clear_external_data:}}{{#get_web_data:url=https://opengeofiction.net/api/0.6/relation/312195/full
+
https://overpass.opengeofiction.net/api/interpreter?data=(area%5B%22admin_level%22%3D%222%22%5D%5Bname~%22%5E(Merganien%7CWyster)%24%22%5D%3B)-%3E.a%3B%20way%5B%22aeroway%22%3D%22aerodrome%22%5D(area.a)%3Bout%3B
|format=xml
 
|data=
 
way_id=/osm/way/@id
 
,name=/osm/way/tag[@k='name']/@v
 
|use xpath
 
}}
 
{| class="wikitable"
 
! Name
 
! Link
 
{{!}}-
 
{{#for_external_table:<nowiki/>
 
{{!}}{{{name}}}
 
{{!}}[http://opengeofiction.net/way/{{{way_id}}} click here]
 
{{!}}-
 
}} |}
 
{{#clear_external_data:}} |}
 
  
===Minimal example 2: use an overpass querry===
+
https://overpass.opengeofiction.net/api/interpreter?data=(area%5B%22admin_level%22%3D%222%22%5D%5Bname%7E%22%5E(Merganien%7CWyster)%24%22%5D%3B)-%3E.a%3B%20way%5B%22aeroway%22%3D%22aerodrome%22%5D(area.a)%3Bout%3B
<pre>
 
{| {{#clear_external_data:}}
 
{{#get_web_data:url=https://ogfoverpass.rent-a-planet.com/api/interpreter?data=%28node%5B%22specialtag%22%3D%22Teststrassexyz%22%5D%3Bway%5B%22specialtag%22%3D%22Teststrassexyz%22%5D%3Brelation%5B%22specialtag%22%3D%22Teststrassexyz%22%5D%3B%29%3Bout%20body%3B%3E%3Bout%20skel%20qt%3B
 
|format=xml
 
|data=
 
way_id=/osm/way/@id
 
,name=/osm/way/tag[@k='name']/@v
 
|use xpath
 
}}
 
{| class="wikitable"
 
! Nane
 
! Link
 
{{!}}-
 
{{#for_external_table:<nowiki/>
 
{{!}}{{{name}}}
 
{{!}}[http://opengeofiction.net/way/{{{way_id}}} click here]
 
{{!}}-
 
}} |}
 
{{#clear_external_data:}} |}
 
</pre>
 
 
 
{| {{#clear_external_data:}}
 
{{#get_web_data:url=https://ogfoverpass.rent-a-planet.com/api/interpreter?data=%28node%5B%22specialtag%22%3D%22Teststrassexyz%22%5D%3Bway%5B%22specialtag%22%3D%22Teststrassexyz%22%5D%3Brelation%5B%22specialtag%22%3D%22Teststrassexyz%22%5D%3B%29%3Bout%20body%3B%3E%3Bout%20skel%20qt%3B
 
|format=xml
 
|data=
 
way_id=/osm/way/@id
 
,name=/osm/way/tag[@k='name']/@v
 
|use xpath
 
}}
 
{| class="wikitable"
 
! Nane
 
! Link
 
{{!}}-
 
{{#for_external_table:<nowiki/>
 
{{!}}{{{name}}}
 
{{!}}[http://opengeofiction.net/way/{{{way_id}}} click here]
 
{{!}}-
 
}} |}
 
{{#clear_external_data:}} |}
 
 
 
===Test subtemplates===
 
{| <!--{{#clear_external_data:}}{{#get_web_data:url=https://opengeofiction.net/api/0.6/relation/312195/full
 
|format=xml
 
|data=
 
way_id=/osm/way/@id
 
,name=/osm/way/tag[@k='name']/@v
 
|use xpath
 
}}-->{{Requestdata test|relation=312195|type=way|column1tag=name}}
 
{| class="wikitable"
 
! Name
 
! Link
 
{{!}}-
 
{{#for_external_table:<nowiki/>
 
{{!}}{{{name}}}
 
{{!}}[http://opengeofiction.net/way/{{{way_id}}} click here]
 
{{!}}-
 
}} |}
 
{{#clear_external_data:}} |}
 
 
 
==Table==
 
 
 
{| {{Template:Rel data | {{{relation}}} | {{{type}}} | {{{column1tag}}} | {{{column2tag}}} | {{{column3tag}}} | {{{column4tag}}} | {{{column5tag}}} | {{{column6tag}}} | {{{column7tag}}} | {{{column8tag}}} | {{{column9tag}}} }}
 
{{ #if:{{{collapsible|}}} |
 
{{ #if:{{{collapsed|}}} |
 
{{{!}} class=&quot;wikitable sortable mw-collapsible mw-collapsed;&quot; |
 
{{{!}} class=&quot;wikitable sortable mw-collapsible&quot; }} |
 
{{{!}} class=&quot;wikitable sortable&quot; }} style=&quot;text-align:left; width:{{{width|500}}}px;&quot;
 
|-
 
! class=&quot;unsortable&quot; style=&quot;background:#{{{bgcolor|CCCCFF}}};&quot; {{ #if:{{{column9tag|}}} |
 
colspan=&quot;9&quot; | {{ #if:{{{column8tag|}}} |
 
colspan=&quot;8&quot; | {{ #if:{{{column7tag|}}} |
 
colspan=&quot;7&quot; | {{ #if:{{{column6tag|}}} |
 
colspan=&quot;6&quot; | {{ #if:{{{column5tag|}}} |
 
colspan=&quot;5&quot; | {{ #if:{{{column4tag|}}} |
 
colspan=&quot;4&quot; | {{ #if:{{{column3tag|}}} |
 
colspan=&quot;3&quot; | {{ #if:{{{column2tag|}}} |
 
colspan=&quot;2&quot; | {{ #if:{{{column1tag|}}} |
 
colspan=&quot;1&quot; }} }} }} }} }} }} }} }} }} | {{{topic|Table}}}
 
! class=&quot;unsortable&quot; style=&quot;background:#{{{bgcolor|CCCCFF}}}; text-align:right; width:50px;&quot; | {{Refresh}}
 
|-
 
{{ #if:{{{column1tag|}}} |
 
{{ #if:{{{column1sort|}}}{{{column1width|}}} |
 
! {{ #if:{{{column1sort|}}} |
 
class=&quot;unsortable&quot; }} {{ #if:{{{column1width|}}} |
 
style=&quot;width:{{{column1width}}}px;&quot; }} {{!}} | ! }} {{{column1name}}}
 
{{ #if:{{{column2tag|}}} |
 
{{ #if:{{{column2sort|}}}{{{column2width|}}} |
 
! {{ #if:{{{column2sort|}}} |
 
class=&quot;unsortable&quot; }} {{ #if:{{{column2width|}}} |
 
style=&quot;width:{{{column2width}}}px;&quot; }} {{!}} | ! }} {{{column2name}}}
 
{{ #if:{{{column3tag|}}} |
 
{{ #if:{{{column3sort|}}}{{{column3width|}}} |
 
! {{ #if:{{{column3sort|}}} |
 
class=&quot;unsortable&quot; }} {{ #if:{{{column3width|}}} |
 
style=&quot;width:{{{column3width}}}px;&quot; }} {{!}} | ! }} {{{column3name}}}
 
{{ #if:{{{column4tag|}}} |
 
{{ #if:{{{column4sort|}}}{{{column4width|}}} |
 
! {{ #if:{{{column4sort|}}} |
 
class=&quot;unsortable&quot; }} {{ #if:{{{column4width|}}} |
 
style=&quot;width:{{{column4width}}}px;&quot; }} {{!}} | ! }} {{{column4name}}}
 
{{ #if:{{{column5tag|}}} |
 
{{ #if:{{{column5sort|}}}{{{column5width|}}} |
 
! {{ #if:{{{column5sort|}}} |
 
class=&quot;unsortable&quot; }} {{ #if:{{{column5width|}}} |
 
style=&quot;width:{{{column5width}}}px;&quot; }} {{!}} | ! }} {{{column5name}}}
 
{{ #if:{{{column6tag|}}} |
 
{{ #if:{{{column6sort|}}}{{{column6width|}}} |
 
! {{ #if:{{{column6sort|}}} |
 
class=&quot;unsortable&quot; }} {{ #if:{{{column6width|}}} |
 
style=&quot;width:{{{column6width}}}px;&quot; }} {{!}} | ! }} {{{column6name}}}
 
{{ #if:{{{column7tag|}}} |
 
{{ #if:{{{column7sort|}}}{{{column7width|}}} |
 
! {{ #if:{{{column7sort|}}} |
 
class=&quot;unsortable&quot; }} {{ #if:{{{column7width|}}} |
 
style=&quot;width:{{{column7width}}}px;&quot; }} {{!}} | ! }} {{{column7name}}}
 
{{ #if:{{{column8tag|}}} |
 
{{ #if:{{{column8sort|}}}{{{column8width|}}} |
 
! {{ #if:{{{column8sort|}}} |
 
class=&quot;unsortable&quot; }} {{ #if:{{{column8width|}}} |
 
style=&quot;width:{{{column8width}}}px;&quot; }} {{!}} | ! }} {{{column8name}}}
 
{{ #if:{{{column9tag|}}} |
 
{{ #if:{{{column9sort|}}}{{{column9width|}}} |
 
! {{ #if:{{{column9sort|}}} |
 
class=&quot;unsortable&quot; }} {{ #if:{{{column9width|}}} |
 
style=&quot;width:{{{column9width}}}px;&quot; }} {{!}} | ! }} {{{column9name}}} }} }} }} }} }} }} }} }} }}
 
! class=&quot;unsortable&quot; | Map
 
|-
 
{{#for_external_table:<nowiki/>
 
{{ #if:{{{column1tag|}}} |
 
{{!}} {{ #if:{{{column1link|}}} |
 
[[{{{{{{column1tag|}}}}}}]] | {{{{{{column1tag|}}}}}}
 
}}
 
{{ #if:{{{column2tag|}}} |
 
{{!}} {{ #if:{{{column2link|}}} |
 
[[{{{{{{column2tag|}}}}}}]] | {{{{{{column2tag|}}}}}}
 
}}
 
{{ #if:{{{column3tag|}}} |
 
{{!}} {{ #if:{{{column3link|}}} |
 
[[{{{{{{column3tag|}}}}}}]] | {{{{{{column3tag|}}}}}}
 
}}
 
{{ #if:{{{column4tag|}}} |
 
{{!}} {{ #if:{{{column4link|}}} |
 
[[{{{{{{column4tag|}}}}}}]] | {{{{{{column4tag|}}}}}}
 
}}
 
{{ #if:{{{column5tag|}}} |
 
{{!}} {{ #if:{{{column5link|}}} |
 
[[{{{{{{column5tag|}}}}}}]] | {{{{{{column5tag|}}}}}}
 
}}
 
{{ #if:{{{column6tag|}}} |
 
{{!}} {{ #if:{{{column6link|}}} |
 
[[{{{{{{column6tag|}}}}}}]] | {{{{{{column6tag|}}}}}}
 
}}
 
{{ #if:{{{column7tag|}}} |
 
{{!}} {{ #if:{{{column7link|}}} |
 
[[{{{{{{column7tag|}}}}}}]] | {{{{{{column7tag|}}}}}}
 
}}
 
{{ #if:{{{column8tag|}}} |
 
{{!}} {{ #if:{{{column8link|}}} |
 
[[{{{{{{column8tag|}}}}}}]] | {{{{{{column8tag|}}}}}}
 
}}
 
{{ #if:{{{column9tag|}}} |
 
{{!}} {{ #if:{{{column9link|}}} |
 
[[{{{{{{column9tag|}}}}}}]] | {{{{{{column9tag|}}}}}}
 
}} }} }} }} }} }} }} }} }} }}
 
{{!}} [[File:OGFmapicon.png|18px|link=]] <span class=&quot;plainlinks&quot;>[https://opengeofiction.net/{{{type}}}/{{{{{{type}}}_id}}} map]</span>
 
{{!}}-
 
}} |}
 
{{#clear_external_data:}}
 
{{#clear_external_data:}} |}
 
 
 
==x==
 
  
 +
https://overpass.opengeofiction.net/api/interpreter?data=(area%5Bname%7E%22%5E(Merganien%7CWyster)%24%22%5D%3B)-%3E.a%3B%20way%5B%22aeroway%22%3D%22aerodrome%22%5D(area.a)%3Bout%3B
  
{{MER-autoTable_rfrsh
 
| relation    = 311781
 
| type        = node
 
| topic      = Rivers in Mergania: nodes
 
| width      = 550
 
| column1name = Name
 
| column1tag  = name
 
}}
 
  
{{MER-autoTable_rfrsh
 
| relation    = 311781
 
| type        = way
 
| topic      = Rivers in Mergania: ways
 
| width      = 550
 
| column1name = Name
 
| column1tag  = name
 
}}
 
  
{{MER-autoTable_rfrsh
 
| relation    = 311781
 
| type        = relation
 
| topic      = Rivers in Mergania: relations
 
| width      = 550
 
| column1name = Name
 
| column1tag  = name
 
}}
 
  
{{MER-autoTable_rfrsh
+
{{#clear_external_data:}}{{#get_web_data:url=https://overpass.opengeofiction.net/api/interpreter?data=(area%5B%22admin_level%22%3D%222%22%5D%5B%22name%22%3D%22Kalm%22%5D%3B)-%3E.a%3B%20way%5B%22aeroway%22%3D%22aerodrome%22%5D(area.a)%3Bout%3B
| relation    = 311782
 
| type        = relation
 
| topic      = Rivers in Mergania: relations
 
| width      = 550
 
| column1name = Name
 
| column1tag  = name
 
}}
 
 
 
===new relation===
 
{{MER-autoTable_rfrsh
 
| relation    = 312146
 
| type        = node
 
| topic      = Rivers in Mergania
 
| width      = 550
 
| column1name = Name
 
| column1tag  = name
 
}}
 
 
 
{{MER-autoTable_rfrsh
 
| relation    = 312146
 
| type        = way
 
| topic      = Rivers in Mergania
 
| width      = 550
 
| column1name = Name
 
| column1tag  = name
 
}}
 
 
 
{{MER-autoTable_rfrsh
 
| relation    = 312146
 
| type        = relation
 
| topic      = Rivers in Mergania
 
| width      = 550
 
| column1name = Name
 
| column1tag  = name
 
}}
 
 
 
===further===
 
{{MER-autoTable_rfrsh
 
| relation    = 340533
 
| type        = way
 
| topic      = Aerotheon Group
 
| width      = 550
 
| column1name = Name
 
| column1tag  = name
 
| column2name = Country
 
| column2tag  = is_in:country
 
| column3name = City
 
| column3tag  = is_in:city
 
| column4name = Products
 
| column4tag  = product
 
}}
 
 
 
{{clear}}
 
 
 
==Overpass testing==
 
 
 
{{#clear_external_data:}}
 
{{#get_web_data:url=https://ogfoverpass.rent-a-planet.com/api/interpreter?data=%28area%5B%22admin_level%22%5D%5B%22ogf%3Aid%22%3D%22UL02a%22%5D%3B%29-%3E.bndarea%3B%0A%28nwr%28area.bndarea%29%5Breligion%3D%27christian%27%5D%288.450638800331001%2C29.970703124999996%2C35.96022296929667%2C64.7314453125%29%3B%29%3Bout%20body%3B%3E%3Bout%20skel%20qt%3B
 
 
|format=xml
 
|format=xml
 
|data=
 
|data=
  wname=/osm/way/tag[@k='name']/@v
+
  way_id=/osm/way/@id,
,wcity=/osm/way/tag[@k='is_in:city']/@v
+
name=/osm/way/tag[@k='name']/@v,
,wid=/osm/way/@id
+
iata=/osm/way/tag[@k='iata']/@v
|use xpath}}
+
|use xpath
{| class="wikitable sortable"
+
}}
! Name
+
{| class="wikitable sortable mw-collapsible mw-collapsed"
! City
+
! width=500px; | Name
! Map
+
! width=100px; | IATA
 
{{#for_external_table:<nowiki/>
 
{{#for_external_table:<nowiki/>
 
{{!}}-
 
{{!}}-
{{!}}{{{wname}}}
+
{{!}}[http://opengeofiction.net/way/{{{way_id}}} {{{name}}}]
{{!}}{{{wcity}}}
+
{{!}}{{{iata}}}
{{!}}[http://opengeofiction.net/way/{{{wid}}} (way {{{wid}}})]
 
 
}}
 
}}
 
|}
 
|}
 
 
==From wiki==
 
 
{{#clear_external_data:}}
 
{{#clear_external_data:}}
{{#get_web_data:url=https://overpass.ogf.rent-a-planet.com/api/interpreter?data=[maxsize:10000000][timeout:30];area[name="Kojo"];nwr[diplomatic=embassy](area); (._;>;); out;
 
|format=xml
 
|data=
 
node_id=/osm/node/@id
 
,name=/osm/node/tag[@k='name']/@v
 
,notes=/osm/node/tag[@k='notes']/@v
 
|use xpath}}
 
{| class="wikitable sortable mw-collapsible mw-expanded"
 
! Name
 
! Notes
 
! Map
 
{{#for_external_table:
 
{{!}}
 
{{!}}{{{name}}}
 
{{!}}{{{notes}}}
 
{{!}}{{node|{{{node_id}}}|Embassy map}}
 
}}
 
|}
 

Latest revision as of 23:00, 3 May 2025

Useful links

Subtemplates

Sites for development


Tests

Airport codes

https://overpass.opengeofiction.net/api/interpreter?data=(way%5B%22name%22%5D%5B%22iata%22%5D%3B)%3Bout%3B

https://overpass.opengeofiction.net/api/interpreter?data=(area%5B%22admin_level%22%3D%222%22%5D%5Bname~%22^(Merganien%7CWyster)%24%22%5D%3B)-%3E.a%3B(way(area.a)%5B%22name%22%5D%5B%22iata%22%5D%3B)%3Bout%3B

https://overpass.opengeofiction.net/api/interpreter?data=(area%5Bname%3D%22Merganien%22%5D%5B%22admin_level%22%3D%222%22%5D%3B%20)-%3E.a%3B%20way%5B%22aeroway%22%3D%22aerodrome%22%5D(area.a)%3Bout%3B

https://overpass.opengeofiction.net/api/interpreter?data=(area%5B%22admin_level%22%5D%5Bname~"^(Wyster|Merganien)$"%5D%3B)-%3E.a%3B%20way%5B%22aeroway%22%3D%22aerodrome%22%5D(area.a)%3Bout%3B

area["admin_level"="2"][name~"^(Merganien|Wyster)$"];)->.a;

area["admin_level"="2"]["name"="Merganien"];)->.a;

https://overpass.opengeofiction.net/api/interpreter?data=(area%5B%22admin_level%22%5D%5Bname~%22%5E(Merganien%7CWyster)%24%22%5D%3B)-%3E.a%3B%3B%20way%5B%22aeroway%22%3D%22aerodrome%22%5D(area.a)%3Bout%3B

https://overpass.opengeofiction.net/api/interpreter?data=(area%5B%22admin_level%22%3D%222%22%5D%5Bname%3D%22Merganien%22%5D%3B%20)-%3E.a%3B%20way%5B%22aeroway%22%3D%22aerodrome%22%5D(area.a)%3Bout%3B

https://overpass.opengeofiction.net/api/interpreter?data=(area%5B%22admin_level%22%3D%222%22%5D%5Bname%3D%22Merganien%22%5D%3B)-%3E.a%3B%20way%5B%22aeroway%22%3D%22aerodrome%22%5D(area.a)%3Bout%3B

https://overpass.opengeofiction.net/api/interpreter?data=(area%5B%22admin_level%22%3D%222%22%5D%5Bname~%22%5E(Merganien%7CWyster)%24%22%5D%3B)-%3E.a%3B%20way%5B%22aeroway%22%3D%22aerodrome%22%5D(area.a)%3Bout%3B

https://overpass.opengeofiction.net/api/interpreter?data=(area%5B%22admin_level%22%3D%222%22%5D%5Bname%7E%22%5E(Merganien%7CWyster)%24%22%5D%3B)-%3E.a%3B%20way%5B%22aeroway%22%3D%22aerodrome%22%5D(area.a)%3Bout%3B

https://overpass.opengeofiction.net/api/interpreter?data=(area%5Bname%7E%22%5E(Merganien%7CWyster)%24%22%5D%3B)-%3E.a%3B%20way%5B%22aeroway%22%3D%22aerodrome%22%5D(area.a)%3Bout%3B



Name IATA

Flugplatz Helster BTG
Segel- und Sportflugplatz Kürliser Heide PTR
Internationaler Flughafen August Judeskron Tarott-Hipplanken FRI
Verkehrsflugplatz Wenneberg-Koganth-Neuenburg FFL
Flughafen Forberg-Golbrünn LIL
Sportflugplatz Nedenauberg
Internationaler Flughafen Orlent
Verkehrslandeplatz Schürren/Honbracht
Flughafen Bütingen
Internationaler Flughafen Pern
Peus Telur Rasmus International Airport Viljanni
Internationaler Flughafen Nerschach
Internationaler Großflughafen Freistat
Flughafen Vennburg
Flugfeld Leutsch
Aerotheon Flugfeld Lilienthal