Difference between revisions of "Develop auto tables"

From geofiction
Jump to navigation Jump to search
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 17:26, 22 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
1586649 25343 raxx 2026-05-04 15:58:54
1586648 1956 kingfries 2026-05-04 15:53:57
1586647 25343 raxx 2026-05-04 15:52:44
1586646 28388 xoxasochka 2026-05-04 15:46:42
1586645 25343 raxx 2026-05-04 15:43:39
1586644 30250 Haksi Tiao 2026-05-04 15:40:59
1586643 28388 xoxasochka 2026-05-04 15:40:56
1586642 1956 kingfries 2026-05-04 15:39:34
1586641 28388 xoxasochka 2026-05-04 15:32:46
1586640 28388 xoxasochka 2026-05-04 15:32:09
1586639 28388 xoxasochka 2026-05-04 15:31:23
1586638 28388 xoxasochka 2026-05-04 15:30:41
1586637 1017 ratsoff2u 2026-05-04 15:27:40
1586636 29068 Ďaq Deg Lińh Qiēd 2026-05-04 15:13:32
1586635 1017 ratsoff2u 2026-05-04 15:06:04
1586634 1017 ratsoff2u 2026-05-04 15:01:40
1586633 30250 Haksi Tiao 2026-05-04 15:00:41
1586632 22566 Olejowy 2026-05-04 14:58:57
1586631 1017 ratsoff2u 2026-05-04 14:56:03
1586630 1017 ratsoff2u 2026-05-04 14:50:56
1586629 27788 pokenia_eidan 2026-05-04 14:47:04
1586628 13156 MarcustheMapper 2026-05-04 14:45:13
1586627 13156 MarcustheMapper 2026-05-04 14:43:17
1586626 1956 kingfries 2026-05-04 14:35:58
1586625 28084 kyunzi 2026-05-04 14:24:08
1586624 1017 ratsoff2u 2026-05-04 13:56:51
1586623 26066 Masyas 2026-05-04 13:44:05
1586622 22566 Olejowy 2026-05-04 13:30:08
1586621 2322 Toadwart 2026-05-04 13:05:18
1586620 11407 Martinawa 2026-05-04 13:02:33
1586619 28084 kyunzi 2026-05-04 12:59:22
1586618 30250 Haksi Tiao 2026-05-04 12:51:31
1586617 30250 Haksi Tiao 2026-05-04 12:49:00
1586616 29892 Triestine 2026-05-04 12:43:58
1586615 28084 kyunzi 2026-05-04 12:41:59
1586614 22243 sudo91 2026-05-04 12:41:17
1586613 26969 JohnnyDoes 2026-05-04 12:39:52
1586612 28187 axaeve 2026-05-04 12:36:53
1586611 2386 thermo_nuclear 2026-05-04 12:30:28
1586610 27788 pokenia_eidan 2026-05-04 12:24:05
1586609 11407 Martinawa 2026-05-04 12:23:17
1586608 27788 pokenia_eidan 2026-05-04 12:22:17
1586607 29515 Pole 2026-05-04 12:21:47
1586606 30250 Haksi Tiao 2026-05-04 12:20:49
1586605 1267 Leowezy 2026-05-04 12:18:01
1586604 1267 Leowezy 2026-05-04 12:14:40
1586603 30408 Avery 2026-05-04 12:13:48
1586602 27948 dev_null_42 2026-05-04 12:12:44
1586601 28815 JasmineDM 2026-05-04 12:08:37
1586600 27788 pokenia_eidan 2026-05-04 12:02:26
1586599 27081 trainsgb 2026-05-04 11:49:49
1586598 24710 Dfltcher2 2026-05-04 11:34:31
1586597 11407 Martinawa 2026-05-04 11:32:28
1586596 24710 Dfltcher2 2026-05-04 11:31:17
1586595 24710 Dfltcher2 2026-05-04 11:23:15
1586594 30092 GMCRTSBusFan_09 2026-05-04 11:17:10
1586593 30092 GMCRTSBusFan_09 2026-05-04 11:13:47
1586592 28815 JasmineDM 2026-05-04 11:05:50
1586591 30092 GMCRTSBusFan_09 2026-05-04 10:58:50
1586590 30092 GMCRTSBusFan_09 2026-05-04 10:57:03
1586589 20854 Mahita 2026-05-04 10:47:28
1586588 22566 Olejowy 2026-05-04 10:35:37
1586587 29272 Signal 2026-05-04 10:25:43
1586586 28929 MattySala 2026-05-04 09:49:56
1586585 27081 trainsgb 2026-05-04 09:47:16
1586584 22566 Olejowy 2026-05-04 09:45:05
1586583 27275 alomico 2026-05-04 09:43:10
1586582 26752 114514aaa 2026-05-04 09:35:14
1586581 12292 Pav 2026-05-04 09:25:38
1586580 22566 Olejowy 2026-05-04 09:24:19
1586579 12292 Pav 2026-05-04 09:15:38
1586578 1267 Leowezy 2026-05-04 08:49:44
1586577 29019 stolas123 2026-05-04 08:43:00
1586576 1267 Leowezy 2026-05-04 08:35:08
1586575 27788 pokenia_eidan 2026-05-04 08:21:30
1586574 30092 GMCRTSBusFan_09 2026-05-04 08:17:42
1586573 30092 GMCRTSBusFan_09 2026-05-04 08:15:51
1586572 27788 pokenia_eidan 2026-05-04 08:04:05
1586571 27788 pokenia_eidan 2026-05-04 07:54:20
1586570 27788 pokenia_eidan 2026-05-04 07:40:59
1586569 30419 ntstocky 2026-05-04 07:31:21
1586568 30419 ntstocky 2026-05-04 07:20:31
1586567 30419 ntstocky 2026-05-04 07:11:00
1586566 30419 ntstocky 2026-05-04 07:08:40
1586565 6375 Hilsonbergman 2026-05-04 07:08:11
1586564 30419 ntstocky 2026-05-04 07:02:30
1586563 30250 Haksi Tiao 2026-05-04 06:58:07
1586562 1267 Leowezy 2026-05-04 06:54:38
1586561 9678 Infrarrojo 2026-05-04 06:51:29
1586560 17528 AustinBoath 2026-05-04 06:44:37
1586559 29029 林雨霞 2026-05-04 06:29:00
1586558 30250 Haksi Tiao 2026-05-04 06:26:17
1586557 9678 Infrarrojo 2026-05-04 06:25:09
1586556 30250 Haksi Tiao 2026-05-04 05:57:38
1586555 6375 Hilsonbergman 2026-05-04 05:56:32
1586554 12340 infinatious 2026-05-04 05:53:26
1586553 12340 infinatious 2026-05-04 05:36:22
1586552 12340 infinatious 2026-05-04 05:26:07
1586551 12340 infinatious 2026-05-04 05:24:20
1586550 12340 infinatious 2026-05-04 05:22:16


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://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 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


Overpass testing

Could not get URL https://ogfoverpass.rent-a-planet.com/api/interpreter?data=%28area%5B%22admin_level%22%5D%5B%22ogf%3Aid%22%3D%22UL02a%22%5D%3B%29-%3E.bndarea%3B%0A%28nwr%28area.bndarea%29%5Breligion%3D%27christian%27%5D%288.450638800331001%2C29.970703124999996%2C35.96022296929667%2C64.7314453125%29%3B%29%3Bout%20body%3B%3E%3Bout%20skel%20qt%3B after 3 tries.

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