query-b32a4466c6e02e6de55b5d517d139df2

rq turtle/ttl

items a 25km de Kasterlee amb article i perĂ² sense foto SELECT DISTINCT ?place ?placeLabel ?location ?dist ?article WHERE { wd:Q725029 wdt:P625 ?loc . #lloc central SERVICE wikibase:around { ?place wdt:P625 ?location . bd:serviceParam wikibase:center ?loc . bd:serviceParam wikibase:radius "25" . } ?article schema:about ?place. MINUS {?place wdt:P18 []} SERVICE wikibase:label { bd:serviceParam wikibase:language "ca, nl, en" } BIND(geof:distance(?loc, ?location) as ?dist) } ORDER BY ?dist

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
PREFIX geof: <http://www.opengis.net/def/function/geosparql/>
PREFIX bd: <http://www.bigdata.com/rdf#>
# items a 25km de Kasterlee amb article i perĂ² sense foto
SELECT DISTINCT ?place ?placeLabel ?location ?dist ?article
WHERE
{
  wd:Q725029 wdt:P625 ?loc . #lloc central
  SERVICE wikibase:around {
      ?place wdt:P625 ?location .
      bd:serviceParam wikibase:center ?loc .
      bd:serviceParam wikibase:radius "25" .
  }
 ?article schema:about ?place.
  MINUS {?place wdt:P18 []}
  SERVICE wikibase:label { bd:serviceParam wikibase:language "ca, nl, en" }
  BIND(geof:distance(?loc, ?location) as ?dist)
} ORDER BY ?dist

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v5("?article"):::projected v6("?dist"):::projected v2("?loc") v4("?location"):::projected v3("?place"):::projected a1((" ")) c4(["bd:serviceParam"]):::iri c7(["25"]):::literal c12(["ca, nl, en"]):::literal c1(["wd:Q725029"]):::iri c1 --"wdt:P625"--> v2 subgraph s1["http://wikiba.se/ontology#around"] style s1 stroke-width:4px; v3 --"wdt:P625"--> v4 c4 --"wikibase:center"--> v2 c4 --"wikibase:radius"--> c7 end v5 --"schema:about"--> v3 subgraph minus0["MINUS"] style minus0 stroke-width:6px,fill:pink,stroke:red; v3 --"wdt:P18"--> a1 end subgraph s2["http://wikiba.se/ontology#label"] style s2 stroke-width:4px; c4 --"wikibase:language"--> c12 end bind1[/"http://www.opengis.net/def/function/geosparql/distance(?loc,?location)"/] v2 --o bind1 v4 --o bind1 bind1 --as--o v6