query-6412044f1b943e46334d38f34dcb31d2
Categorie di Commons da creare o collegare con P18
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 (URI(REPLACE(str(?pic), 'Special:FilePath/', 'File:')) AS ?pic_url) ?pic ?coord WHERE {
?item wdt:P18 ?pic .
wd:Q13377 wdt:P625 ?Loc .
SERVICE wikibase:around {
?item wdt:P625 ?coord .
bd:serviceParam wikibase:center ?Loc .
bd:serviceParam wikibase:radius "30" .
bd:serviceParam wikibase:distance ?dist.
}
FILTER NOT EXISTS {?item wdt:P373 ?commonscat} .
SERVICE wikibase:label { bd:serviceParam wikibase:language "en", "it", "fr", "nl" . }
} # LIMIT 100
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?Loc")
v2("?commonscat")
v5("?coord"):::projected
v6("?dist")
v1("?item"):::projected
v3("?pic"):::projected
v7("?pic_url")
c13(["en"]):::literal
c14(["it"]):::literal
c15(["fr"]):::literal
c3(["wd:Q13377"]):::iri
c6(["bd:serviceParam"]):::iri
c9(["30"]):::literal
c16(["nl"]):::literal
f0[["not "]]
subgraph f0e0["Exists Clause"]
e0v1 --"wdt:P373"--> e0v2
e0v2("?commonscat"):::projected
e0v1("?item"):::projected
end
f0--EXISTS--> f0e0
f0 --> v1
f0 --> c1
f0 --> v2
v1 --"wdt:P373"--> v2
v1 --"wdt:P18"--> v3
c3 --"wdt:P625"--> v4
subgraph s1["http://wikiba.se/ontology#around"]
style s1 stroke-width:4px;
v1 --"wdt:P625"--> v5
c6 --"wikibase:center"--> v4
c6 --"wikibase:radius"--> c9
c6 --"wikibase:distance"--> v6
end
subgraph s2["http://wikiba.se/ontology#label"]
style s2 stroke-width:4px;
c6 --"wikibase:language"--> c13
c6 --"wikibase:language"--> c14
c6 --"wikibase:language"--> c15
c6 --"wikibase:language"--> c16
end
bind1[/"replace(str(?pic),'Special:FilePath/','File:')"/]
v3 --o bind1
bind1 --as--o v7