query-4a833fec215e367ebf8c6a5a52b7fe11
22:09, 4 August 2023 (UTC)) talk (skSo you get also alle lakes in all subregions. --22:56, 4 August 2023 (UTC)) talk (BjsJust a little + sign? Thanks for the help. However, this query only finds 14 lakes. It appears that most of the lakes are not assigned to an administratve unit at all. I probably will have to make a query for state=Italy and output a map. --I use in this case mostly a wikibase:around sparql. So I can see all lakes and add an administratve unit.
Use at
- https://query.wikidata.org/sparql
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#>
#defaultView:Map
SELECT ?item ?itemLabel ?coordinate WHERE {
wd:Q1460 wdt:P625 ?Center. # Sicily
?item wdt:P31 wd:Q23397; # lake
SERVICE wikibase:around {
?item wdt:P625 ?coordinate.
bd:serviceParam wikibase:center ?Center.
bd:serviceParam wikibase:radius "275". # 275 Kilometer around
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "de,en,[AUTO_LANGUAGE]". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?Center")
v3("?coordinate"):::projected
v2("?item"):::projected
c4(["wd:Q23397"]):::iri
c9(["275"]):::literal
c6(["bd:serviceParam"]):::iri
c1(["wd:Q1460"]):::iri
c12(["de,en,#91;AUTO_LANGUAGE#93;"]):::literal
c1 --"wdt:P625"--> v1
v2 --"wdt:P31"--> c4
subgraph s1["http://wikiba.se/ontology#around"]
style s1 stroke-width:4px;
v2 --"wdt:P625"--> v3
c6 --"wikibase:center"--> v1
c6 --"wikibase:radius"--> c9
end
subgraph s2["http://wikiba.se/ontology#label"]
style s2 stroke-width:4px;
c6 --"wikibase:language"--> c12
end