Tables with overpass

From geofiction
Jump to navigation Jump to search

How to create tables with overpass query

Overpass requests

link to overpass site

https://overpass.opengeofiction.net/

Mergan area

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

search nodes, ways and relations

(node["xxx"="xxx"];way["xxx"="xxx"];relation["xxx"="xxx"];)
(node(area.bndarea)["tourism"="museum"]({{bbox}});way(area.bndarea)["tourism"="museum"]({{bbox}});relation(area.bndarea)["tourism"="museum"]({{bbox}}););out body;>;out skel qt;
(area["admin_level"=2]["name"="Merganien"];)->.bndarea;
(node(area.bndarea)["tourism"="museum"]({{bbox}});way(area.bndarea)["tourism"="museum"]({{bbox}});relation(area.bndarea)["tourism"="museum"]({{bbox}}););out body;>;out skel qt;

share link

https://overpass.opengeofiction.net/?Q=%2F*%0AThis%20is%20an%20example%20Overpass%20query.%0ATry%20it%20out%20by%20pressing%20the%20Run%20button%20above!%0AYou%20can%20find%20more%20examples%20with%20the%20Load%20tool.%0A*%2F%0Anode%0A%20%20%5Bamenity%3Ddrinking_water%5D%0A%20%20(%7B%7Bbbox%7D%7D)%3B%0Aout%3B&C=20.72882;86.6581;11


a
a
a
a
a
a

Table

overpass request

{{#clear_external_data:}}{{#get_web_data:url=https://overpass.ogf.rent-a-planet.com/api/interpreter?data=...
|format=xml
|data=...
|use xpath
}}

data requests for way

way_id=/osm/way/@id,
lat=/osm/way/center/@lat,
lon=/osm/way/center/@lon,
name=/osm/way/tag[@k='name']/@v,
...
{| class="wikitable"

>

{| class="wikitable sortable"

headline with reload button

|+ List of airports <!--<span class="plainlink">([https://wiki.opengeofiction.net/index.php/{{FULLPAGENAMEE}}?action=purge&titles={{FULLPAGENAMEE}} '''<span style=color:#04B404>refresh</span>'''])</span>--> {{Purge}}
|-

table header

! width=100px; | Country
! width=130px; | Primary city
! width=150px; | Airport name
! width=30px; | Code
! width=100px; | Continent
! width=70px; | Type
! width=50px; | Gates
! width=100px; | Runways
! width=250px; | Location
a

table content

{{#for_external_table:<nowiki/>
{{!}}-
{{!}}[[{{{country}}}]]
{{!}}[[{{{country}}}#{{{city}}}|{{{city}}}]]
{{!}}[[{{{country}}}#Aviation|{{{name}}}]]
{{!}}<code>{{{code}}}</code>
{{!}}[[{{{continent}}}]]
{{!}}{{{type}}}
{{!}}{{{gates}}}
{{!}}{{{runways}}}
{{!}}[[File:Airplane silhouette.svg|20px|link=]] <span class="plainlinks">[https://opengeofiction.net/way/{{{way_id}}} {{{lat}}}/{{{lon}}}]</span>
}}

foot: close table and clear

|}{{#clear_external_data:}}