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 |
|---|---|---|---|
| 1550741 | 2194 | UN1TY | 2025-12-10 10:29:46 |
| 1550740 | 10218 | Arlo | 2025-12-10 10:17:42 |
| 1550739 | 10218 | Arlo | 2025-12-10 10:09:17 |
| 1550738 | 2236 | William | 2025-12-10 09:41:01 |
| 1550737 | 224 | Boge | 2025-12-10 09:28:11 |
| 1550736 | 29207 | Fusionia | 2025-12-10 09:22:41 |
| 1550735 | 29207 | Fusionia | 2025-12-10 09:22:01 |
| 1550734 | 10218 | Arlo | 2025-12-10 09:20:04 |
| 1550733 | 29207 | Fusionia | 2025-12-10 09:10:45 |
| 1550732 | 29207 | Fusionia | 2025-12-10 09:06:15 |
| 1550731 | 10218 | Arlo | 2025-12-10 08:40:16 |
| 1550730 | 10218 | Arlo | 2025-12-10 08:33:12 |
| 1550729 | 10218 | Arlo | 2025-12-10 08:17:15 |
| 1550728 | 1368 | Otto Yamamoto | 2025-12-10 08:04:19 |
| 1550727 | 1368 | Otto Yamamoto | 2025-12-10 08:02:53 |
| 1550726 | 1368 | Otto Yamamoto | 2025-12-10 08:01:32 |
| 1550725 | 344 | indyroads | 2025-12-10 06:47:51 |
| 1550724 | 25152 | nejisadd | 2025-12-10 06:24:50 |
| 1550723 | 1141 | Imperator | 2025-12-10 06:15:50 |
| 1550722 | 11647 | curiomap | 2025-12-10 06:02:43 |
| 1550721 | 10218 | Arlo | 2025-12-10 05:45:13 |
| 1550720 | 11647 | curiomap | 2025-12-10 05:45:06 |
| 1550719 | 21669 | Kevin J | 2025-12-10 05:35:59 |
| 1550718 | 10218 | Arlo | 2025-12-10 05:11:43 |
| 1550717 | 6375 | Hilsonbergman | 2025-12-10 05:07:37 |
| 1550716 | 21669 | Kevin J | 2025-12-10 04:40:31 |
| 1550715 | 5562 | CartographerKing | 2025-12-10 04:16:27 |
| 1550714 | 13652 | Zytik | 2025-12-10 03:38:59 |
| 1550713 | 28535 | SeñorR | 2025-12-10 03:25:35 |
| 1550712 | 23735 | Juan Pablo Balam | 2025-12-10 03:03:16 |
| 1550711 | 954 | BMSOUZA | 2025-12-10 02:47:01 |
| 1550710 | 954 | BMSOUZA | 2025-12-10 02:42:29 |
| 1550709 | 6697 | pdplm | 2025-12-10 02:39:36 |
| 1550708 | 954 | BMSOUZA | 2025-12-10 02:36:33 |
| 1550707 | 954 | BMSOUZA | 2025-12-10 02:30:16 |
| 1550706 | 2322 | Toadwart | 2025-12-10 02:02:37 |
| 1550705 | 22595 | Crarji | 2025-12-10 02:02:05 |
| 1550704 | 10218 | Arlo | 2025-12-10 01:54:24 |
| 1550703 | 29834 | pietervdvn | 2025-12-10 01:38:33 |
| 1550702 | 29834 | pietervdvn | 2025-12-10 01:38:06 |
| 1550701 | 26049 | cheakshibe | 2025-12-10 01:35:45 |
| 1550700 | 29834 | pietervdvn | 2025-12-10 01:35:31 |
| 1550699 | 29834 | pietervdvn | 2025-12-10 01:35:26 |
| 1550698 | 29834 | pietervdvn | 2025-12-10 01:34:45 |
| 1550697 | 29834 | pietervdvn | 2025-12-10 01:33:33 |
| 1550696 | 29834 | pietervdvn | 2025-12-10 01:33:11 |
| 1550695 | 29834 | pietervdvn | 2025-12-10 01:32:08 |
| 1550694 | 29834 | pietervdvn | 2025-12-10 01:31:57 |
| 1550693 | 27705 | HugoCG | 2025-12-10 01:07:31 |
| 1550692 | 17027 | Mapping Expert | 2025-12-10 00:42:36 |
| 1550691 | 27705 | HugoCG | 2025-12-10 00:41:16 |
| 1550690 | 19188 | KTheBritMC | 2025-12-10 00:40:31 |
| 1550689 | 17027 | Mapping Expert | 2025-12-10 00:33:58 |
| 1550688 | 1602 | Ūdilugbulgidħū | 2025-12-10 00:25:05 |
| 1550687 | 1602 | Ūdilugbulgidħū | 2025-12-10 00:24:42 |
| 1550686 | 1602 | Ūdilugbulgidħū | 2025-12-10 00:23:48 |
| 1550685 | 1602 | Ūdilugbulgidħū | 2025-12-10 00:23:32 |
| 1550684 | 1602 | Ūdilugbulgidħū | 2025-12-10 00:23:16 |
| 1550683 | 1602 | Ūdilugbulgidħū | 2025-12-10 00:23:00 |
| 1550682 | 1761 | Brunanter | 2025-12-10 00:17:50 |
| 1550681 | 11647 | curiomap | 2025-12-10 00:17:26 |
| 1550680 | 12833 | theruler | 2025-12-10 00:09:48 |
| 1550679 | 11647 | curiomap | 2025-12-09 23:57:46 |
| 1550678 | 17027 | Mapping Expert | 2025-12-09 23:55:50 |
| 1550677 | 11647 | curiomap | 2025-12-09 23:55:44 |
| 1550676 | 1761 | Brunanter | 2025-12-09 23:51:19 |
| 1550675 | 3527 | ParAvion | 2025-12-09 23:14:29 |
| 1550674 | 11647 | curiomap | 2025-12-09 23:06:57 |
| 1550673 | 11647 | curiomap | 2025-12-09 23:02:43 |
| 1550672 | 28761 | DynoDynosaur218 | 2025-12-09 23:00:20 |
| 1550671 | 28187 | axaeve | 2025-12-09 22:51:27 |
| 1550670 | 28130 | kaszojadzikexe | 2025-12-09 22:31:49 |
| 1550669 | 27081 | trainsgb | 2025-12-09 22:23:00 |
| 1550668 | 759 | Aces California | 2025-12-09 22:19:13 |
| 1550667 | 29007 | ntnmchdo | 2025-12-09 22:18:29 |
| 1550666 | 1463 | No Way | 2025-12-09 22:13:26 |
| 1550665 | 27221 | Zir0e | 2025-12-09 22:05:56 |
| 1550664 | 1463 | No Way | 2025-12-09 22:04:11 |
| 1550663 | 18 | Easky30 | 2025-12-09 22:01:26 |
| 1550662 | 29752 | opnwix | 2025-12-09 21:58:51 |
| 1550661 | 25559 | bananaman101 | 2025-12-09 21:58:51 |
| 1550660 | 29207 | Fusionia | 2025-12-09 21:54:32 |
| 1550659 | 14788 | Geoc3ladus | 2025-12-09 21:52:29 |
| 1550658 | 14788 | Geoc3ladus | 2025-12-09 21:48:30 |
| 1550657 | 23033 | Distel | 2025-12-09 21:38:25 |
| 1550656 | 28187 | axaeve | 2025-12-09 21:34:32 |
| 1550655 | 29752 | opnwix | 2025-12-09 21:31:43 |
| 1550654 | 17027 | Mapping Expert | 2025-12-09 21:27:12 |
| 1550653 | 17027 | Mapping Expert | 2025-12-09 21:22:53 |
| 1550652 | 23033 | Distel | 2025-12-09 21:16:51 |
| 1550651 | 26855 | MiniMapper | 2025-12-09 21:11:09 |
| 1550650 | 29752 | opnwix | 2025-12-09 21:06:51 |
| 1550649 | 29007 | ntnmchdo | 2025-12-09 20:59:36 |
| 1550648 | 13652 | Zytik | 2025-12-09 20:49:58 |
| 1550647 | 22595 | Crarji | 2025-12-09 20:43:38 |
| 1550646 | 18 | Easky30 | 2025-12-09 20:37:43 |
| 1550645 | 2236 | William | 2025-12-09 20:28:02 |
| 1550644 | 22595 | Crarji | 2025-12-09 20:21:04 |
| 1550643 | 25152 | nejisadd | 2025-12-09 20:05:03 |
| 1550642 | 1267 | Leowezy | 2025-12-09 20:01:28 |
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 |
|---|