query-193408d31a62c1d7a795c6237fc6429b
Bounding box for a map). Q56753858Bounding box for a single map (
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 psv: <http://www.wikidata.org/prop/statement/value/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
PREFIX geo: <http://www.opengis.net/ont/geosparql#>
#defaultView:Map{"hide":"?bbox"}
SELECT DISTINCT ?item ?itemLabel ?img ?bbox WHERE {
VALUES ?item {wd:Q56753858 }
?item p:P1332/psv:P1332/wikibase:geoLatitude ?nth .
?item p:P1333/psv:P1333/wikibase:geoLatitude ?sth .
?item p:P1334/psv:P1334/wikibase:geoLongitude ?east .
?item p:P1335/psv:P1335/wikibase:geoLongitude ?west .
OPTIONAL {?item wdt:P18 ?img} .
BIND(STRDT( CONCAT('LINESTRING (',
str(?west), ' ', str(?sth), ',',
str(?west), ' ', str(?nth), ',',
str(?east), ' ', str(?nth), ',',
str(?east), ' ', str(?sth), ',',
str(?west), ' ', str(?sth), ')' ), geo:wktLiteral) AS ?bbox) .
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v7("?bbox"):::projected
v4("?east")
v6("?img"):::projected
v1("?item"):::projected
v2("?nth")
v3("?sth")
v5("?west")
a1((" "))
a2((" "))
a3((" "))
a4((" "))
a5((" "))
a6((" "))
a7((" "))
a8((" "))
c13(["bd:serviceParam"]):::iri
c15(["#91;AUTO_LANGUAGE#93;,en"]):::literal
bind0[/VALUES ?item/]
bind0-->v1
bind00(["wd:Q56753858"])
bind00 --> bind0
v1 --"p:P1332"--> a1
a1 --"p:statement/value/P1332"--> a2
a2 --"wikibase:geoLatitude"--> v2
v1 --"p:P1333"--> a3
a3 --"p:statement/value/P1333"--> a4
a4 --"wikibase:geoLatitude"--> v3
v1 --"p:P1334"--> a5
a5 --"p:statement/value/P1334"--> a6
a6 --"wikibase:geoLongitude"--> v4
v1 --"p:P1335"--> a7
a7 --"p:statement/value/P1335"--> a8
a8 --"wikibase:geoLongitude"--> v5
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."p:direct/P18".-> v6
end
bind1[/"STRDT(concat('LINESTRING (',str(?west),' ',str(?sth),',',str(?west),' ',str(?nth),',',str(?east),' ',str(?nth),',',str(?east),' ',str(?sth),',',str(?west),' ',str(?sth),')'),'geo:wktLiteral')"/]
v5 --o bind1
v3 --o bind1
v2 --o bind1
v4 --o bind1
bind1 --as--o v7
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c13 --"wikibase:language"--> c15
end