query-afaf206824239c6ac6f8a88a10a26919

rq turtle/ttl

TODO

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX psv: <http://www.wikidata.org/prop/statement/value/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#defaultView:Map
SELECT ?item ?itemLabel ?coordinate WHERE
{
   {
  SELECT ?item WHERE {
  wd:Q1460 wdt:P625 ?Center.    # Sicily
  SERVICE wikibase:around {
    ?item wdt:P625 ?coordinate.
    bd:serviceParam wikibase:center ?Center.
    bd:serviceParam wikibase:radius "275". # 275Kilometer around
  }
    } }
   {
  SELECT ?item WHERE {
      ?item wdt:P31/wdt:P279* wd:Q23397.       # lake
} }  ?item p:P625 ?stat .
  ?stat a wikibase:BestRank .  
  ?stat psv:P625/wikibase:geoLongitude ?long.
  ?stat psv:P625/wikibase:geoLatitude ?lat.
  wd:Q1460 p:P1332/psv:P1332/wikibase:geoLatitude ?north . filter(?lat <= ?north )
  wd:Q1460 p:P1333/psv:P1333/wikibase:geoLatitude ?south . filter(?lat >= ?south )
  wd:Q1460 p:P1334/psv:P1334/wikibase:geoLongitude ?east . filter(?long <= ?east )
  wd:Q1460 p:P1335/psv:P1335/wikibase:geoLongitude ?west . filter(?long >= ?west )
  ?item wdt:P625 ?coordinate.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "it,en,[AUTO_LANGUAGE]". }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v7("?Center") v9("?coordinate"):::projected v3("?east") v8("?item"):::projected v4("?lat") v1("?long") v6("?north") v5("?south") v10("?stat") v2("?west") a1((" ")) a2((" ")) a3((" ")) a4((" ")) a5((" ")) a6((" ")) a7((" ")) a8((" ")) a9((" ")) a10((" ")) a11((" ")) c7(["275"]):::literal c27(["it,en,#91;AUTO_LANGUAGE#93;"]):::literal c4(["bd:serviceParam"]):::iri c1(["wd:Q1460"]):::iri c10(["wd:Q23397"]):::iri c13(["wikibase:BestRank"]):::iri f0[["?long >= ?west"]] f0 --> v1 f0 --> v2 f1[["?long <= ?east"]] f1 --> v1 f1 --> v3 f2[["?lat >= ?south"]] f2 --> v4 f2 --> v5 f3[["?lat <= ?north"]] f3 --> v4 f3 --> v6 c1 --"p:direct/P625"--> v7 subgraph s1["http://wikiba.se/ontology#around"] style s1 stroke-width:4px; v8 --"p:direct/P625"--> v9 c4 --"wikibase:center"--> v7 c4 --"wikibase:radius"--> c7 end v8 --"p:direct/P31"--> a1 a1 --"p:direct/P279"--> c10 v8 --"p:P625"--> v10 v10 --"a"--> c13 v10 --"p:statement/value/P625"--> a2 a2 --"wikibase:geoLongitude"--> v1 v10 --"p:statement/value/P625"--> a3 a3 --"wikibase:geoLatitude"--> v4 c1 --"p:P1332"--> a4 a4 --"p:statement/value/P1332"--> a5 a5 --"wikibase:geoLatitude"--> v6 c1 --"p:P1333"--> a6 a6 --"p:statement/value/P1333"--> a7 a7 --"wikibase:geoLatitude"--> v5 c1 --"p:P1334"--> a8 a8 --"p:statement/value/P1334"--> a9 a9 --"wikibase:geoLongitude"--> v3 c1 --"p:P1335"--> a10 a10 --"p:statement/value/P1335"--> a11 a11 --"wikibase:geoLongitude"--> v2 v8 --"p:direct/P625"--> v9 subgraph s2["http://wikiba.se/ontology#label"] style s2 stroke-width:4px; c4 --"wikibase:language"--> c27 end