query-7a1a14a66e1bc03e9158005df9da45f9

rq turtle/ttl

Locodes 200 km around some place

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?place ?placeLabel ?val ?location
WHERE
{
    ?place wdt:P1937 ?val . 
    ?place wdt:P17 wd:Q38.
    wd:Q388085 wdt:P625 ?sediloLoc .
      SERVICE wikibase:around { 
          ?place wdt:P625 ?location . 
          bd:serviceParam wikibase:center ?sediloLoc . 
          bd:serviceParam wikibase:radius "200" . 
          bd:serviceParam wikibase:distance ?dist.
      } 
    SERVICE wikibase:label { bd:serviceParam wikibase:language "it" }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v5("?dist") v4("?location"):::projected v1("?place"):::projected v3("?sediloLoc") v2("?val"):::projected c14(["it"]):::literal c4(["wd:Q388085"]):::iri c3(["wd:Q38"]):::iri c10(["200"]):::literal c7(["bd:serviceParam"]):::iri v1 --"wdt:P1937"--> v2 v1 --"wdt:P17"--> c3 c4 --"wdt:P625"--> v3 subgraph s1["http://wikiba.se/ontology#around"] style s1 stroke-width:4px; v1 --"wdt:P625"--> v4 c7 --"wikibase:center"--> v3 c7 --"wikibase:radius"--> c10 c7 --"wikibase:distance"--> v5 end subgraph s2["http://wikiba.se/ontology#label"] style s2 stroke-width:4px; c7 --"wikibase:language"--> c14 end