query-31b4a626aa289e60198aee377c303968

rq turtle/ttl

Bouzinac(P197)adjacent station (P1545)series ordinal

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX geof: <http://www.opengis.net/def/function/geosparql/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?coords ?dist WHERE {
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
  ?item wdt:P81 wd:Q18165631; wdt:P625 ?coords.
  filter(?item not in(wd:Q112825155))

  wd:Q112823927 wdt:P625 ?Burnley_St_Victoria_St_coord .
  BIND(geof:distance(?Burnley_St_Victoria_St_coord, ?coords) as ?dist) 
}
ORDER BY ?dist

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v4("?Burnley_St_Victoria_St_coord") v3("?coords"):::projected v5("?dist"):::projected v2("?item"):::projected c3(["bd:serviceParam"]):::iri c7(["wd:Q18165631"]):::iri c5(["#91;AUTO_LANGUAGE#93;,en"]):::literal c9(["wd:Q112823927"]):::iri f0[["?item != 'wd:Q112825155'"]] f0 --> v2 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c3 --"wikibase:language"--> c5 end v2 --"wdt:P81"--> c7 v2 --"wdt:P625"--> v3 c9 --"wdt:P625"--> v4 bind1[/"http://www.opengis.net/def/function/geosparql/distance(?Burnley_St_Victoria_St_coord,?coords)"/] v4 --o bind1 v3 --o bind1 bind1 --as--o v5