Difference between revisions of "Develop auto tables"
m (→further) |
|||
| 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 11:29, 23 January 2023
Useful links
- Hilfe:Tabellen
- Template:MER-autoTable rfrsh
- Template:Table_rel
- Template:Table_opq
- Template:Rel_data
- Template:Opq_data
- Template:Table_fill
Workin overpass examples
correct link:https://overpass.ogf.rent-a-planet.com/api/interpreter?data
list of airports
Error while fetching data from 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: $2.
Error fetching URL: Could not resolve host: overpass.ogf.rent-a-planet.com
There was a problem during the HTTP request: 0 Error
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 |
|---|
list of rivers
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 |
|---|
last edits
| Changeset ID | User ID | User Name | Date and Time |
|---|---|---|---|
| 1587609 | 27275 | alomico | 2026-05-09 03:54:45 |
| 1587608 | 28084 | kyunzi | 2026-05-09 03:39:10 |
| 1587607 | 5562 | CartographerKing | 2026-05-09 03:34:35 |
| 1587606 | 28067 | saigyoujinoriko | 2026-05-09 03:26:49 |
| 1587605 | 28084 | kyunzi | 2026-05-09 03:22:25 |
| 1587604 | 28067 | saigyoujinoriko | 2026-05-09 03:02:09 |
| 1587603 | 28084 | kyunzi | 2026-05-09 03:01:54 |
| 1587602 | 28067 | saigyoujinoriko | 2026-05-09 02:58:35 |
| 1587601 | 30419 | ntstocky | 2026-05-09 02:48:43 |
| 1587600 | 28084 | kyunzi | 2026-05-09 02:41:53 |
| 1587599 | 30419 | ntstocky | 2026-05-09 02:37:36 |
| 1587598 | 30419 | ntstocky | 2026-05-09 02:31:02 |
| 1587597 | 30419 | ntstocky | 2026-05-09 02:26:08 |
| 1587596 | 1761 | Brunanter | 2026-05-09 02:15:33 |
| 1587595 | 30419 | ntstocky | 2026-05-09 02:12:10 |
| 1587594 | 28067 | saigyoujinoriko | 2026-05-09 02:10:39 |
| 1587593 | 30419 | ntstocky | 2026-05-09 02:10:34 |
| 1587592 | 28084 | kyunzi | 2026-05-09 02:09:06 |
| 1587591 | 30419 | ntstocky | 2026-05-09 02:09:04 |
| 1587590 | 30419 | ntstocky | 2026-05-09 02:08:24 |
| 1587589 | 17286 | ItsTybear | 2026-05-09 02:03:49 |
| 1587588 | 29007 | ntnmchdo | 2026-05-09 02:01:36 |
| 1587587 | 27579 | PoisonDog522 | 2026-05-09 01:55:58 |
| 1587586 | 29007 | ntnmchdo | 2026-05-09 01:50:17 |
| 1587585 | 23845 | Brothie | 2026-05-09 01:47:39 |
| 1587584 | 27290 | Berdly | 2026-05-09 01:46:23 |
| 1587583 | 22998 | Tomikals | 2026-05-09 01:34:32 |
| 1587582 | 30260 | 3R1N | 2026-05-09 01:26:12 |
| 1587581 | 1761 | Brunanter | 2026-05-09 01:22:55 |
| 1587580 | 3225 | zhenkang | 2026-05-09 01:20:40 |
| 1587579 | 26856 | jr000 | 2026-05-09 01:18:31 |
| 1587578 | 24720 | blz | 2026-05-09 01:17:03 |
| 1587577 | 22998 | Tomikals | 2026-05-09 01:16:08 |
| 1587576 | 30260 | 3R1N | 2026-05-09 01:15:33 |
| 1587575 | 26856 | jr000 | 2026-05-09 01:12:26 |
| 1587574 | 26856 | jr000 | 2026-05-09 01:12:07 |
| 1587573 | 1477 | PortCal | 2026-05-09 01:12:05 |
| 1587572 | 22595 | Crarji | 2026-05-09 01:10:58 |
| 1587571 | 30260 | 3R1N | 2026-05-09 01:09:06 |
| 1587570 | 27275 | alomico | 2026-05-09 01:05:26 |
| 1587569 | 22595 | Crarji | 2026-05-09 01:04:52 |
| 1587568 | 28815 | JasmineDM | 2026-05-09 00:54:35 |
| 1587567 | 22595 | Crarji | 2026-05-09 00:46:15 |
| 1587566 | 22595 | Crarji | 2026-05-09 00:30:33 |
| 1587565 | 25913 | Sweetykid | 2026-05-09 00:30:21 |
| 1587564 | 232 | Ernestpkirby | 2026-05-09 00:15:53 |
| 1587563 | 30455 | BigglyBadlyUser | 2026-05-09 00:12:46 |
| 1587562 | 30455 | BigglyBadlyUser | 2026-05-09 00:11:52 |
| 1587561 | 28815 | JasmineDM | 2026-05-08 23:59:11 |
| 1587560 | 28815 | JasmineDM | 2026-05-08 23:43:55 |
| 1587559 | 1405 | tule00 | 2026-05-08 23:40:50 |
| 1587558 | 23845 | Brothie | 2026-05-08 23:38:54 |
| 1587557 | 29840 | morusque | 2026-05-08 23:37:01 |
| 1587556 | 468 | wangi | 2026-05-08 23:34:32 |
| 1587555 | 468 | wangi | 2026-05-08 23:34:18 |
| 1587554 | 17027 | Mapping Expert | 2026-05-08 23:21:44 |
| 1587553 | 17027 | Mapping Expert | 2026-05-08 23:18:58 |
| 1587552 | 23845 | Brothie | 2026-05-08 23:18:13 |
| 1587551 | 26719 | Lemuria | 2026-05-08 23:17:07 |
| 1587550 | 17027 | Mapping Expert | 2026-05-08 23:16:31 |
| 1587549 | 14001 | Taka | 2026-05-08 23:11:37 |
| 1587548 | 468 | wangi | 2026-05-08 23:10:29 |
| 1587547 | 23845 | Brothie | 2026-05-08 23:01:55 |
| 1587546 | 28112 | qhfreddy | 2026-05-08 22:57:20 |
| 1587545 | 17027 | Mapping Expert | 2026-05-08 22:56:58 |
| 1587544 | 2725 | ruadh | 2026-05-08 22:56:43 |
| 1587543 | 232 | Ernestpkirby | 2026-05-08 22:54:47 |
| 1587542 | 1477 | PortCal | 2026-05-08 22:52:21 |
| 1587541 | 17027 | Mapping Expert | 2026-05-08 22:51:08 |
| 1587540 | 17027 | Mapping Expert | 2026-05-08 22:48:19 |
| 1587539 | 17027 | Mapping Expert | 2026-05-08 22:40:27 |
| 1587538 | 1139 | Rasmus Rasmusson | 2026-05-08 22:40:14 |
| 1587537 | 17027 | Mapping Expert | 2026-05-08 22:35:47 |
| 1587536 | 1139 | Rasmus Rasmusson | 2026-05-08 22:30:54 |
| 1587535 | 1139 | Rasmus Rasmusson | 2026-05-08 22:27:43 |
| 1587534 | 1139 | Rasmus Rasmusson | 2026-05-08 22:19:27 |
| 1587533 | 27081 | trainsgb | 2026-05-08 22:19:05 |
| 1587532 | 17027 | Mapping Expert | 2026-05-08 22:08:01 |
| 1587531 | 28130 | kaszojadzikexe | 2026-05-08 22:01:30 |
| 1587530 | 17027 | Mapping Expert | 2026-05-08 21:55:04 |
| 1587529 | 25870 | Alexmar983 | 2026-05-08 21:43:32 |
| 1587528 | 26093 | nsenx | 2026-05-08 21:41:03 |
| 1587527 | 25870 | Alexmar983 | 2026-05-08 21:38:24 |
| 1587526 | 401 | Kalh79 | 2026-05-08 20:39:30 |
| 1587525 | 4711 | logasa1 | 2026-05-08 20:36:19 |
| 1587524 | 14612 | Glauber | 2026-05-08 20:26:49 |
| 1587523 | 16354 | Gonzy | 2026-05-08 20:12:30 |
| 1587522 | 28815 | JasmineDM | 2026-05-08 19:34:13 |
| 1587521 | 1139 | Rasmus Rasmusson | 2026-05-08 19:13:48 |
| 1587520 | 28815 | JasmineDM | 2026-05-08 19:12:34 |
| 1587519 | 4764 | Oriolet | 2026-05-08 19:11:47 |
| 1587518 | 1139 | Rasmus Rasmusson | 2026-05-08 19:09:09 |
| 1587517 | 24412 | theCubic | 2026-05-08 18:56:33 |
| 1587516 | 1139 | Rasmus Rasmusson | 2026-05-08 18:56:07 |
| 1587515 | 1139 | Rasmus Rasmusson | 2026-05-08 18:48:27 |
| 1587514 | 25913 | Sweetykid | 2026-05-08 18:33:22 |
| 1587513 | 28815 | JasmineDM | 2026-05-08 18:23:07 |
| 1587512 | 22426 | Aad | 2026-05-08 18:19:08 |
| 1587511 | 22426 | Aad | 2026-05-08 18:17:40 |
| 1587510 | 22426 | Aad | 2026-05-08 18:17:14 |
Simple tables
| A | B | C |
|---|---|---|
| aaaaaaa | bbbbbbbbbbbbbbb | ccccccccccc |
| A | B | C |
|---|---|---|
| aaaaaaa | bbbbbbbbbbbbbbb | ccccccccccc |
| Table | |
|---|---|
| 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 | |
|---|---|
| Map |
x
| Rivers in Mergania: nodes | |
|---|---|
| Name | Map |
| Rivers in Mergania: ways | |
|---|---|
| Name | Map |
| Farau Way | |
| Farau Way |
| Rivers in Mergania: relations | |
|---|---|
| Name | Map |
| Farau Relation |
| Rivers in Mergania: relations | |
|---|---|
| Name | Map |
| Farau Relation | |
| Rivers in Mergania |
new relation
| Rivers in Mergania | |
|---|---|
| Name | Map |
| Rivers in Mergania | |
|---|---|
| Name | Map |
| Fluss z | |
| Bach y | |
| Fluss y | |
| Bach x | |
| Fluss x |
| Rivers in Mergania | |
|---|---|
| Name | Map |
| Fluss 1 | |
| Fluss 2 | |
| Bach 1 | |
| Rivers in Mergania |
further
| Aerotheon Group | ||||
|---|---|---|---|---|
| Name | Country | City | Products | Map |
| Aerotheon | Mergania | Gubenau | aircraft | |
| Aerotheon | Mergania | Lansing | aircraft | |
| Aerotheon Port II | Mergania | Lilienthal | aircraft | |
| Aerotheon | Mergania | Lilienthal | aircraft | |
| Aerotheon Port I | Mergania | Lilienthal | ||
| AEROTHEON Wing Technology Development Center | Mergania | Lillenthal | ||
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 |
|---|
| Name | Length (km) |
Drains into |
|---|
}}ii6
uu
count=/osm/count/@total
count=/osm/count/tag[@k='total']/@v