Difference between revisions of "Develop auto tables"

From geofiction
Jump to navigation Jump to search
Line 539: Line 539:
 
| column4tag  = product
 
| column4tag  = product
 
}}
 
}}
 +
{{clear}}
 +
 +
 +
===Test count===
 +
{{#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:}}
 +
  
 
{{clear}}
 
{{clear}}
 +
 +
 +
 +
 +
{{#clear_external_data:}}{{#get_web_data:url=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%22highway%22%3D%22motorway%22%5D;way(area.bndarea)%5B%22highway%22%3D%22highway%22%5D;relation(area.bndarea)%5B%22highway%22%3D%22motorway%22%5D%3B)%3B%0Aout%20count%3B%3E%3Bout%20skel%20qt%3B
 +
|format=xml
 +
|data=
 +
count=/osm/way/tag[@k='highway']/@v
 +
|use xpath}}
 +
{| class="wikitable sortable"
 +
! Name
 +
! Length<br/>(km)<br>
 +
! Drains into
 +
{{#for_external_table:<nowiki/>
 +
{{!}}-
 +
{{!}}{{{count}}}
 +
{{!}}ö
 +
{{!}}l
 +
}}
 +
|}
 +
{{#clear_external_data:}}
 +
 +
 +
 +
}}ii{{{count|6}}}{{#for_external_table:{{{count}}} }}{{#clear_external_data:}}
 +
 +
 +
uu
 +
count=/osm/count/@total
 +
 +
count=/osm/count/tag[@k='total']/@v
 +
  
 
<!--
 
<!--

Revision as of 10:29, 23 January 2023

Useful links

Workin overpass examples

correct link:https://overpass.ogf.rent-a-planet.com/api/interpreter?data



last edits

Refresh
Changeset ID User ID User Name Date and Time
1564464 28989 HugoC01 2026-02-03 21:03:13
1564463 10004 Cirocov 2026-02-03 20:56:45
1564462 10004 Cirocov 2026-02-03 20:37:07
1564461 28112 qhfreddy 2026-02-03 20:21:29
1564460 28112 qhfreddy 2026-02-03 20:19:33
1564459 18 Easky30 2026-02-03 19:59:30
1564458 12833 theruler 2026-02-03 19:56:16
1564457 29788 av8787 2026-02-03 19:54:53
1564456 29951 TheRealStanPines 2026-02-03 19:47:12
1564455 4597 ADB52 2026-02-03 19:47:11
1564454 12833 theruler 2026-02-03 19:45:04
1564453 29981 Кріц 2026-02-03 19:41:05
1564452 14001 Taka 2026-02-03 19:30:10
1564451 6326 jba487_14 2026-02-03 19:28:20
1564450 25343 raxx 2026-02-03 19:27:32
1564449 18 Easky30 2026-02-03 19:23:59
1564448 25343 raxx 2026-02-03 19:23:41
1564447 29981 Кріц 2026-02-03 19:17:42
1564446 18 Easky30 2026-02-03 19:16:04
1564445 12833 theruler 2026-02-03 19:13:37
1564444 27579 PoisonDog522 2026-02-03 19:08:03
1564443 26855 MiniMapper 2026-02-03 19:06:16
1564442 25343 raxx 2026-02-03 19:03:01
1564441 29951 TheRealStanPines 2026-02-03 19:00:19
1564440 25343 raxx 2026-02-03 18:59:51
1564439 29981 Кріц 2026-02-03 18:57:47
1564438 26855 MiniMapper 2026-02-03 18:54:25
1564437 6326 jba487_14 2026-02-03 18:49:13
1564436 12833 theruler 2026-02-03 18:49:04
1564435 29981 Кріц 2026-02-03 18:42:31
1564434 25343 raxx 2026-02-03 18:41:17
1564433 26855 MiniMapper 2026-02-03 18:40:55
1564432 6326 jba487_14 2026-02-03 18:38:19
1564431 26855 MiniMapper 2026-02-03 18:35:07
1564430 29951 TheRealStanPines 2026-02-03 18:34:19
1564429 25343 raxx 2026-02-03 18:34:01
1564428 18 Easky30 2026-02-03 18:30:56
1564427 28112 qhfreddy 2026-02-03 18:22:24
1564426 26855 MiniMapper 2026-02-03 18:19:52
1564425 29951 TheRealStanPines 2026-02-03 18:18:24
1564424 30009 Frederikcastell 2026-02-03 18:15:35
1564423 28815 JasmineDM 2026-02-03 18:14:41
1564422 29951 TheRealStanPines 2026-02-03 18:09:16
1564421 29951 TheRealStanPines 2026-02-03 18:07:07
1564420 25870 Alexmar983 2026-02-03 18:03:48
1564419 29981 Кріц 2026-02-03 18:01:32
1564418 28815 JasmineDM 2026-02-03 17:56:38
1564417 12833 theruler 2026-02-03 17:53:31
1564416 29951 TheRealStanPines 2026-02-03 17:43:45
1564415 27600 ParrotMan 2026-02-03 17:24:55
1564414 29951 TheRealStanPines 2026-02-03 17:17:40
1564413 29951 TheRealStanPines 2026-02-03 17:13:53
1564412 5230 geoboi 2026-02-03 17:13:34
1564411 26979 lxgwsierra 2026-02-03 16:58:48
1564410 29515 Pole 2026-02-03 16:54:30
1564409 23033 Distel 2026-02-03 16:50:42
1564408 29951 TheRealStanPines 2026-02-03 16:49:34
1564407 28815 JasmineDM 2026-02-03 16:48:41
1564406 30009 Frederikcastell 2026-02-03 16:45:11
1564405 25343 raxx 2026-02-03 16:41:54
1564404 29951 TheRealStanPines 2026-02-03 16:37:43
1564403 25343 raxx 2026-02-03 16:24:48
1564402 1267 Leowezy 2026-02-03 16:23:35
1564401 29951 TheRealStanPines 2026-02-03 16:22:06
1564400 25343 raxx 2026-02-03 16:21:38
1564399 10082 Öllöjoumi 2026-02-03 16:17:03
1564398 29886 Manfred 2026-02-03 16:09:44
1564397 25343 raxx 2026-02-03 16:07:32
1564396 29951 TheRealStanPines 2026-02-03 16:06:31
1564395 25343 raxx 2026-02-03 16:06:20
1564394 26855 MiniMapper 2026-02-03 15:57:37
1564393 25343 raxx 2026-02-03 15:56:41
1564392 10082 Öllöjoumi 2026-02-03 15:55:53
1564391 23735 Juan Pablo Balam 2026-02-03 15:53:52
1564390 12833 theruler 2026-02-03 15:53:30
1564389 10082 Öllöjoumi 2026-02-03 15:52:51
1564388 17027 Mapping Expert 2026-02-03 15:51:24
1564387 25343 raxx 2026-02-03 15:49:54
1564386 23033 Distel 2026-02-03 15:49:45
1564385 28815 JasmineDM 2026-02-03 15:47:10
1564384 17027 Mapping Expert 2026-02-03 15:45:31
1564383 1747 tparigo 2026-02-03 15:42:28
1564382 10082 Öllöjoumi 2026-02-03 15:41:30
1564381 23033 Distel 2026-02-03 15:39:48
1564380 25343 raxx 2026-02-03 15:39:04
1564379 25343 raxx 2026-02-03 15:38:32
1564378 1822 ante44 2026-02-03 15:37:53
1564377 217 antoon 2026-02-03 15:37:27
1564376 1267 Leowezy 2026-02-03 15:37:23
1564375 29951 TheRealStanPines 2026-02-03 15:37:03
1564374 25343 raxx 2026-02-03 15:36:44
1564373 28815 JasmineDM 2026-02-03 15:35:11
1564372 23033 Distel 2026-02-03 15:35:10
1564371 25343 raxx 2026-02-03 15:33:29
1564370 10082 Öllöjoumi 2026-02-03 15:33:01
1564369 14030 NorthTeaPower 2026-02-03 15:31:13
1564368 29951 TheRealStanPines 2026-02-03 15:26:21
1564367 12833 theruler 2026-02-03 15:22:17
1564366 6326 jba487_14 2026-02-03 15:15:51
1564365 13652 Zytik 2026-02-03 15:11:40

Simple tables

A B C
aaaaaaa bbbbbbbbbbbbbbb ccccccccccc
A B C
aaaaaaa bbbbbbbbbbbbbbb ccccccccccc



Table MER-refresh.png
Map

|}

Requesting data

Minimal example 1: use a relation

{{#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:}}
Name Link
Teststraße 1 click here
Teststraße 2 click here
Teststraße 3 click here
Teststraße 4 click here
Teststraße 5 click here
Teststraße 6 click here
Teststraße 7 click here
Teststraße 8 click here

Minimal example 2: use an overpass querry

{| {{#clear_external_data:}}
{{#get_web_data:url=https://overpass.ogf.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:}} |}
Could not get URL https://overpass.ogf.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 after 3 tries.
Nane Link

Test subtemplates

Name Link
Teststraße 1 click here
Teststraße 2 click here
Teststraße 3 click here
Teststraße 4 click here
Teststraße 5 click here
Teststraße 6 click here
Teststraße 7 click here
Teststraße 8 click here

Test subtemplates

Name Link
Teststraße 1 click here
Teststraße 2 click here
Teststraße 3 click here
Teststraße 4 click here
Teststraße 5 click here
Teststraße 6 click here
Teststraße 7 click here
Teststraße 8 click here

Table

Table MER-refresh.png
Map

x

Rivers in Mergania: nodes MER-refresh.png
Name Map
OGFmapicon.png map
OGFmapicon.png map
OGFmapicon.png map
OGFmapicon.png map
OGFmapicon.png map


Rivers in Mergania: ways MER-refresh.png
Name Map
Farau Way OGFmapicon.png map
Farau Way OGFmapicon.png map


Rivers in Mergania: relations MER-refresh.png
Name Map
Farau Relation OGFmapicon.png map


Rivers in Mergania: relations MER-refresh.png
Name Map
Farau Relation OGFmapicon.png map
Rivers in Mergania OGFmapicon.png map


new relation

Rivers in Mergania MER-refresh.png
Name Map
OGFmapicon.png map
OGFmapicon.png map
OGFmapicon.png map
OGFmapicon.png map
OGFmapicon.png map
OGFmapicon.png map
OGFmapicon.png map
OGFmapicon.png map
OGFmapicon.png map
OGFmapicon.png map
OGFmapicon.png map
OGFmapicon.png map
OGFmapicon.png map
OGFmapicon.png map
OGFmapicon.png map


Rivers in Mergania MER-refresh.png
Name Map
Fluss z OGFmapicon.png map
Bach y OGFmapicon.png map
Fluss y OGFmapicon.png map
Bach x OGFmapicon.png map
Fluss x OGFmapicon.png map


Rivers in Mergania MER-refresh.png
Name Map
Fluss 1 OGFmapicon.png map
Fluss 2 OGFmapicon.png map
Bach 1 OGFmapicon.png map
Rivers in Mergania OGFmapicon.png map


further

Aerotheon Group MER-refresh.png
Name Country City Products Map
Aerotheon Mergania Gubenau aircraft OGFmapicon.png map
Aerotheon Mergania Lansing aircraft OGFmapicon.png map
Aerotheon Port II Mergania Lilienthal aircraft OGFmapicon.png map
Aerotheon Mergania Lilienthal aircraft OGFmapicon.png map
Aerotheon Port I Mergania Lilienthal OGFmapicon.png map
AEROTHEON Wing Technology Development Center Mergania Lillenthal OGFmapicon.png map


Test count

Could not get 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 after 3 tries.

Name Length
(km)
Drains into




Could not get URL 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%22highway%22%3D%22motorway%22%5D;way(area.bndarea)%5B%22highway%22%3D%22highway%22%5D;relation(area.bndarea)%5B%22highway%22%3D%22motorway%22%5D%3B)%3B%0Aout%20count%3B%3E%3Bout%20skel%20qt%3B after 3 tries.

Name Length
(km)
Drains into



}}ii6


uu

count=/osm/count/@total
count=/osm/count/tag[@k='total']/@v