Opened 5 years ago
Last modified 5 years ago
#18541 new enhancement
Obtain tagging descriptions from OpenStreetMap Wiki item
Reported by: | simon04 | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Core | Version: | |
Keywords: | wikidata wiki | Cc: | nyurik |
Description (last modified by )
- Hover row/key
opening_hours
in PropertiesDialog - JOSM queries https://wiki.openstreetmap.org/w/api.php?action=wbgetentities&format=json&languagefallback=1&languages=en&origin=*&sites=wiki&titles=Locale%3Aen%7CKey%3Aopening%20hours which is the structured data from https://wiki.openstreetmap.org/wiki/Item:Q1667
- JOSM extracts "Describes when something is open or closed. …"
Attachments (1)
Change History (8)
by , 5 years ago
Attachment: | screenshot_id.png added |
---|
comment:1 by , 5 years ago
Description: | modified (diff) |
---|
comment:2 by , 5 years ago
Description: | modified (diff) |
---|
comment:3 by , 5 years ago
comment:4 by , 5 years ago
Cc: | added |
---|
The following SPARQL query may be used via https://sophox.org/
SELECT ?osmd ?key ?tag ?description WHERE { VALUES ?key_or_tag { osmd:Q7 osmd:Q2 } ?osmd osmdt:P2 ?key_or_tag. OPTIONAL { ?osmd osmdt:P16 ?key }. OPTIONAL { ?osmd osmdt:P19 ?tag }. ?osmd schema:description ?desc. BIND(STR(?desc) AS ?description) BIND(LANG(?desc) AS ?lang) FILTER (?lang = 'de') }
However, https://github.com/Sophox/sophox/issues/14 is somewhat critical since the request for all German description transfers >700 KB and does not use gzip.
comment:5 by , 5 years ago
I would rather suggest you use a dedicated label service to get description in a specific language:
SELECT ?osmd ?key ?tag ?osmdDescription WHERE { VALUES ?key_or_tag { osmd:Q7 osmd:Q2 } ?osmd osmdt:P2 ?key_or_tag. OPTIONAL { ?osmd osmdt:P16 ?key }. OPTIONAL { ?osmd osmdt:P19 ?tag }. SERVICE wikibase:label { bd:serviceParam wikibase:language "de,en". } }
comment:6 by , 5 years ago
I've already tried this variant. However, this query also returns many rows w/o a description. For German the number of results increases from 2k to 20k, and the size from 0.74 MB to 4.91 MB.
comment:7 by , 5 years ago
ah, makes perfect sense, thanks. I will have to look into data compression - I am not sure if Blazegraph supports it, so either i will have to wrap it into yet another proxy, or see if Traefik proxy supports it.
related to #17842