query-9b726932168444b3b0952c4202217bb8
Maps
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 rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX psv: <http://www.wikidata.org/prop/statement/value/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
# Items in Bulgaria that have coordinates and an p31 statement.
# defaultView:Map
SELECT ?item ?coord ?itemLabel ?layer
WHERE
{
?item wdt:P17 wd:Q219 .
?item p:P625 [ ps:P625 ?coord; psv:P625 ?coordV ] .
?item wdt:P31 ?type .
?coordV wikibase:geoLongitude ?longitude .
#FILTER(?longitude < 25.5) .
OPTIONAL { ?type rdfs:label ?layer. FILTER(LANG(?layer) = "en"). }
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en" .
}
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?coord"):::projected
v4("?coordV")
v2("?item"):::projected
v1("?layer"):::projected
v6("?longitude")
v5("?type")
a1((" "))
c11(["bd:serviceParam"]):::iri
c3(["wd:Q219"]):::iri
c1(["en"]):::literal
v2 --"p:direct/P17"--> c3
a1 --"p:statement/P625"--> v3
a1 --"p:statement/value/P625"--> v4
v2 --"p:P625"--> a1
v2 --"p:direct/P31"--> v5
v4 --"wikibase:geoLongitude"--> v6
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v5 -."rdfs:label".-> v1
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c11 --"wikibase:language"--> c1
end