Difference between revisions of "Template:Ogftablecode"

From geofiction
Jump to navigation Jump to search
m
Line 60: Line 60:
 
{{#clear_external_data:}}
 
{{#clear_external_data:}}
 
</pre>
 
</pre>
 +
 +
==Codes==
 +
===Test 1===
 +
<pre>
 +
{{Ogftablecode | type = way| search1 = name | search2 = iata | search3 = icao}}
 +
</pre>
 +
{{Ogftablecode | type = way| search1 = name | search2 = iata | search3 = icao}}
  
 
[[Category:Overpass templates]]</noinclude>
 
[[Category:Overpass templates]]</noinclude>

Revision as of 01:04, 29 January 2023


Examples

{{#clear_external_data:}}{{#get_web_data:url=
{{Ogftablecode | type = node | area = MER | search1 = name/Gobeletplain}}

https://overpass.ogf.rent-a-planet.com/api/interpreter?data=(area%5B%22admin_level%22=2%5D%5B%22name%22=%22Merganien%22%5D;)-%3E.bndarea;%0A(node(area.bndarea)%5B%22name%22%3D%22Gobeletplain%22%5D;way(area.bndarea)%5B%22name%22%3D%22Gobeletplain%22%5D;relation(area.bndarea)%5B%22name%22%3D%22Gobeletplain%22%5D%3B)%3Bout%3B

|format=xml<!--
|order by=/osm/{{{type}}}/tag[@k='name']/@v DESC-->
|data=
 obj_id=/osm/node/@id
 xxxxxx=/osm/node/tag[@k='xxxxxx']/@v
|use xpath
}}
{| class="wikitable sortable"
! Name
! a
! b
{{#for_external_table:<nowiki/>
{{!}}-
{{!}}[http://opengeofiction.net/way/{{{way_id}}} {{{name}}}]
{{!}}{{{a}}}
{{!}}{{{b}}}
}}
|}
{{#clear_external_data:}}

Codes

Test 1

{{Ogftablecode | type = way| search1 = name | search2 = iata | search3 = icao}}

https://overpass.ogf.rent-a-planet.com/api/interpreter?data=(node%5B%22name%22%5D%5B%22iata%22%5D%5B%22icao%22%5D;way%5B%22name%22%5D%5B%22iata%22%5D%5B%22icao%22%5D;relation%5B%22name%22%5D%5B%22iata%22%5D%5B%22icao%22%5D%3B)%3Bout%3B