query-3b60c249e82fff25d415fba713bdac8b
Heritage on the Camino de Santiago
Usuario:Galopax/Pintando_mapas_2 (WP-ES)
User:Galopax/Painting maps (WD)
added 2021-06-23
SELECT DISTINCT ?a ?aLabel ?layerLabel ?lat ?lon ?image ?sitelinkES ?website WHERE { SERVICE wikibase:label { bd:serviceParam wikibase:language "es,en". } ?a (wdt:P361*) wd:Q41150. ?a p:P625 ?statement . # coordinate-location statement ?statement psv:P625 ?coordinate_node . ?coordinate_node wikibase:geoLatitude ?lat . ?coordinate_node wikibase:geoLongitude ?lon . ?a wdt:P361 ?ruta. ?ruta wdt:P31 wd:Q337912. BIND (?ruta AS ?layer) OPTIONAL { ?a wdt:P856 ?website. } OPTIONAL { ?a wdt:P18 ?image.} OPTIONAL { ?sitelinkES schema:isPartOf https://es.wikipedia.org/; schema:about ?a. } }
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 schema: <http://schema.org/>
PREFIX psv: <http://www.wikidata.org/prop/statement/value/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#Heritage on the Camino de Santiago
#Usuario:Galopax/Pintando_mapas_2 (WP-ES)
#User:Galopax/Painting maps (WD)
#added 2021-06-23
SELECT DISTINCT ?a ?aLabel ?layerLabel ?lat ?lon ?image ?sitelinkES ?website
WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "es,en". }
?a (wdt:P361*) wd:Q41150.
?a p:P625 ?statement . # coordinate-location statement
?statement psv:P625 ?coordinate_node .
?coordinate_node wikibase:geoLatitude ?lat .
?coordinate_node wikibase:geoLongitude ?lon .
?a wdt:P361 ?ruta.
?ruta wdt:P31 wd:Q337912.
BIND (?ruta AS ?layer)
OPTIONAL { ?a wdt:P856 ?website. }
OPTIONAL { ?a wdt:P18 ?image.}
OPTIONAL { ?sitelinkES schema:isPartOf <https://es.wikipedia.org/>;
schema:about ?a.
}
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?a"):::projected
v3("?coordinate_node")
v9("?image"):::projected
v4("?lat"):::projected
v7("?layer")
v5("?lon"):::projected
v6("?ruta")
v10("?sitelinkES"):::projected
v2("?statement")
v8("?website"):::projected
c4(["es,en"]):::literal
c6(["wd:Q41150"]):::iri
c12(["wd:Q337912"]):::iri
c2(["bd:serviceParam"]):::iri
c16([https://es.wikipedia.org/]):::iri
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c2 --"wikibase:language"--> c4
end
v1 --"p:direct/P361"--> c6
v1 --"p:P625"--> v2
v2 --"p:statement/value/P625"--> v3
v3 --"wikibase:geoLatitude"--> v4
v3 --"wikibase:geoLongitude"--> v5
v1 --"p:direct/P361"--> v6
v6 --"p:direct/P31"--> c12
bind0[/"?ruta"/]
v6 --o bind0
bind0 --as--o v7
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."p:direct/P856".-> v8
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v1 -."p:direct/P18".-> v9
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v10 -."schema:isPartOf".-> c16
v10 --"schema:about"--> v1
end