query-90373e806910431e6ec7d0bf7787e989
Natura 2000 - Spain
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#>
#Espacios naturales protegidos - Natura 2000
#Identificador OSM, WPES, LL
#Usuario:Galopax/Pintando_mapas_2
#User:Galopax/Painting maps (WD)
#added 2022-02-15
#defaultView:Map
SELECT ?item ?itemLabel ?Natura_2000 ?osm ?eswiki ?coord ?image ?commons ?lat ?lon
(CONCAT("[http://natura2000.eea.europa.eu/Natura2000/SDF.aspx?site=",?Natura_2000,"]") as ?url1)
WHERE {
?item wdt:P17 wd:Q29.
?item wdt:P3425 ?Natura_2000.#identificador Natura 2000
MINUS {?item wdt:P276 wd:Q5813.}
MINUS {?item wdt:P276 wd:Q107356467.}
OPTIONAL {?item wdt:P625 ?coord. }
OPTIONAL {?item wdt:P18 ?image.}
OPTIONAL {?item wdt:P402 ?osm.}
OPTIONAL {
?eswiki schema:about ?item;
schema:isPartOf <https://es.wikipedia.org/>. }
OPTIONAL {
?commons schema:about ?item;
schema:isPartOf <https://commons.wikimedia.org/>. }
BIND(IF(BOUND(?cat),ENCODE_FOR_URI(?cat),"" ) as ?catstring)
SERVICE wikibase:label { bd:serviceParam wikibase:language "es". }
?item p:P625 ?statement . # coordinate-location statement
?statement psv:P625 ?coordinate_node .
?coordinate_node wikibase:geoLatitude ?lat .
?coordinate_node wikibase:geoLongitude ?lon .
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?Natura_2000"):::projected
v8("?catstring")
v7("?commons"):::projected
v3("?coord"):::projected
v10("?coordinate_node")
v6("?eswiki"):::projected
v4("?image"):::projected
v1("?item"):::projected
v11("?lat"):::projected
v12("?lon"):::projected
v5("?osm"):::projected
v9("?statement")
v13("?url1")
c5(["wd:Q5813"]):::iri
c13([https://commons.wikimedia.org/]):::iri
c17(["es"]):::literal
c2(["wd:Q29"]):::iri
c15(["bd:serviceParam"]):::iri
c12([https://es.wikipedia.org/]):::iri
c6(["wd:Q107356467"]):::iri
v1 --"p:direct/P17"--> c2
v1 --"p:direct/P3425"--> v2
subgraph minus0["MINUS"]
style minus0 stroke-width:6px,fill:pink,stroke:red;
v1 --"p:direct/P276"--> c5
end
subgraph minus1["MINUS"]
style minus1 stroke-width:6px,fill:pink,stroke:red;
v1 --"p:direct/P276"--> c6
end
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."p:direct/P625".-> v3
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v1 -."p:direct/P18".-> v4
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v1 -."p:direct/P402".-> v5
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v6 -."schema:about".-> v1
v6 --"schema:isPartOf"--> c12
end
subgraph optional4["(optional)"]
style optional4 fill:#bbf,stroke-dasharray: 5 5;
v7 -."schema:about".-> v1
v7 --"schema:isPartOf"--> c13
end
bind2[/"if(bound(?cat),encode-for-uri(?cat),'')"/]
null --o bind2
bind2 --as--o v8
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c15 --"wikibase:language"--> c17
end
v1 --"p:P625"--> v9
v9 --"p:statement/value/P625"--> v10
v10 --"wikibase:geoLatitude"--> v11
v10 --"wikibase:geoLongitude"--> v12
bind3[/"concat('#91;http://natura2000.eea.europa.eu/Natura2000/SDF.aspx?site=',?Natura_2000,'#93;')"/]
v2 --o bind3
bind3 --as--o v13