query-981259e4d22f6617ec89baeb2b88e4e7
TODO
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#>
#Mapa de municipis de Catalunya (sense la Vall d'Aran)
SELECT DISTINCT ?municipi ?municipiLabel ?layer ?layerLabel ?lat ?lon ?coord
WHERE {
?municipi wdt:P31 wd:Q33146843.
?municipi wdt:P131* ?layer.
?layer wdt:P31 wd:Q937876.
?municipi p:P625 ?coordinate .
?municipi wdt:P625 ?coord.
?coordinate psv:P625 ?coordinate_node .
?coordinate_node wikibase:geoLatitude ?lat .
?coordinate_node wikibase:geoLongitude ?lon .
SERVICE wikibase:label {
bd:serviceParam wikibase:language 'ca' . }
}
#defaultView:Map
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?coord"):::projected
v3("?coordinate")
v5("?coordinate_node")
v6("?lat"):::projected
v2("?layer"):::projected
v7("?lon"):::projected
v1("?municipi"):::projected
c2(["wd:Q33146843"]):::iri
c11(["bd:serviceParam"]):::iri
c4(["wd:Q937876"]):::iri
c13(["ca"]):::literal
v1 --"p:direct/P31"--> c2
v1 --"p:direct/P131"--> v2
v2 --"p:direct/P31"--> c4
v1 --"p:P625"--> v3
v1 --"p:direct/P625"--> v4
v3 --"p:statement/value/P625"--> v5
v5 --"wikibase:geoLatitude"--> v6
v5 --"wikibase:geoLongitude"--> v7
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c11 --"wikibase:language"--> c13
end