OpenGeofiction

Issues with Wiki automated tables

Posted by Aiki on 9 August 2017 in English (English)

Hello dear mappers,

I have started to move the embassies in Guai from their current ungrouped relations type to a set of nodes grouped in a dedicated relation. The purpose is, of course, to manage them more easily in JOSM but also in the corresponding Wiki article.

I started with using Mstr's automated tables but switch to using a regular #get_web_data so that I can concatenate values from "addr:street" & "addr:housenumber" in one single column and displayed "name:en" below the original "name". On this table, I'm facing two issues:

  • The table is not necessarily updated when new members are added to the relation. It does not even display the same results when I'm logged in and when I'm not. I've added #clear_external_data but it doesn't seem enough.

  • I cannot "Order by" country the table so that the result is displayed by node @id by default (e.g. Broceliande Embassy and Cultural Centre are shown separately). Apparently, data should be sorted before being uploaded on the table. For xml file, it appears you need to code in xPath which doesn't contain "order by" operator but a function expression.addSort. My coding knowledge having reached its limits, does anyone know how this could be embedded in the query?

I thank you a lot if someone's got some clue on how to fix these two issues.

Aiki

Comment from wangi on 9 August 2017 at 15:24

First off, have you thought about avoiding the relation completely? You don't need it, see: http://wiki.opengeofiction.net/wiki/index.php/Talk:OGF:Automated_tables_and_lists#No_need_for_the_relation

Hide this comment

Comment from Aiki on 9 August 2017 at 16:21

Hi Wangi,

Indeed, I thought about using an overpass but I couldn't figure out how I would find the embassies/cultural centre in JOSM afterwards without the relation linking them as I don't know how to imply "where embnation is not null" in the ctrl+F menu in JOSM. "Embnation" stores the country name, whatever the amenity type. I use "diplorank" to indicate whether the node is an embassy, consulate (both amenity = embassy) or a cultural centre, economic mission and so on.

I think you face the same kind of issue for sorting results because overpass use xml as well. Am I right?

Aiki

Hide this comment

Comment from wangi on 10 August 2017 at 10:51

On the tagging, you'd want the following instead of embnation and diplorank:

  • amenity=embassy
  • diplomatic=embassy or consulate or ...
  • country=represented country code from OGFSCC
  • target=GUA

As for finding them, just search for "embnation" on it's own does the non-null.

Hide this comment

Comment from Aiki on 10 August 2017 at 11:30

Hi wangi,

Thanks a lot. I would move values to these tags.

For the overpass, I went on trying node["embnation"]["addr:country"="Guai"]; which worked fine for getting the same nodes as the relation (quite logical :-p). I could also use diplomatic:receiving_country="Guai" later.

I browsed for some information but it seems you can only sort results by id or quadtile. I find rather weird that you cannot choose the order key for displaying the results.

Hide this comment

Leave a comment

Parsed with Markdown

  • Headings

    # Heading
    ## Subheading

  • Unordered list

    * First item
    * Second item

  • Ordered list

    1. First item
    2. Second item

  • Link

    [Text](URL)
  • Image

    ![Alt text](URL)

Login to leave a comment