Difference between revisions of "Develop auto tables"
m |
|||
| Line 7: | Line 7: | ||
*[[Template:Opq_data]] | *[[Template:Opq_data]] | ||
*[[Template:Table_fill]] | *[[Template:Table_fill]] | ||
| + | |||
| + | ==Workin overpass examples== | ||
| + | |||
| + | correct link:https://overpass.ogf.rent-a-planet.com/api/interpreter?data | ||
| + | |||
| + | <div class="mw-collapsible mw-collapsed"> | ||
| + | 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}} | ||
| + | |||
| + | |||
| + | <div class="mw-collapsible mw-collapsed"> | ||
| + | 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== | ==Simple tables== | ||
Revision as of 16:26, 22 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 rivers
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 |
|---|
last edits
| Changeset ID | User ID | User Name | Date and Time |
|---|---|---|---|
| 1564492 | 1158 | Y Knott | 2026-02-03 23:42:43 |
| 1564491 | 1158 | Y Knott | 2026-02-03 23:39:01 |
| 1564490 | 4597 | ADB52 | 2026-02-03 23:33:50 |
| 1564489 | 1158 | Y Knott | 2026-02-03 23:32:59 |
| 1564488 | 28112 | qhfreddy | 2026-02-03 23:26:01 |
| 1564487 | 10218 | Arlo | 2026-02-03 23:20:03 |
| 1564486 | 28195 | LowtideInkling | 2026-02-03 23:18:52 |
| 1564485 | 10218 | Arlo | 2026-02-03 23:14:45 |
| 1564484 | 5230 | geoboi | 2026-02-03 23:12:08 |
| 1564483 | 30048 | Rainbow_Drop | 2026-02-03 23:08:24 |
| 1564482 | 10218 | Arlo | 2026-02-03 23:04:19 |
| 1564481 | 10218 | Arlo | 2026-02-03 22:54:38 |
| 1564480 | 10218 | Arlo | 2026-02-03 22:45:22 |
| 1564479 | 26855 | MiniMapper | 2026-02-03 22:45:04 |
| 1564478 | 29019 | stolas123 | 2026-02-03 22:44:42 |
| 1564477 | 26855 | MiniMapper | 2026-02-03 22:33:01 |
| 1564476 | 13652 | Zytik | 2026-02-03 22:19:42 |
| 1564475 | 14001 | Taka | 2026-02-03 22:01:16 |
| 1564474 | 17027 | Mapping Expert | 2026-02-03 21:53:34 |
| 1564473 | 29892 | Triestine | 2026-02-03 21:48:32 |
| 1564472 | 13652 | Zytik | 2026-02-03 21:44:29 |
| 1564471 | 26623 | QuartzSpoonOGF | 2026-02-03 21:43:13 |
| 1564470 | 13652 | Zytik | 2026-02-03 21:39:59 |
| 1564469 | 22566 | Olejowy | 2026-02-03 21:36:18 |
| 1564468 | 27770 | DutchYoda | 2026-02-03 21:26:54 |
| 1564467 | 28989 | HugoC01 | 2026-02-03 21:22:20 |
| 1564466 | 29515 | Pole | 2026-02-03 21:18:07 |
| 1564465 | 27770 | DutchYoda | 2026-02-03 21:16:37 |
| 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 |
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://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:}} |}
Could not get 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 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 |
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 | ||
Overpass testing
| Name | City | Map |
|---|
From wiki
Could not get URL https://overpass.ogf.rent-a-planet.com/api/interpreter?data=[maxsize:10000000][timeout:30];area[name="Kojo"];nwr[diplomatic=embassy](area);%20(._;>;);%20out; after 3 tries.
| Name | Notes | Map |
|---|