query-2e093e6007ea97d6f201f94616b4c808
Carte :
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 ps: <http://www.wikidata.org/prop/statement/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#defaultView:Map
SELECT ?ville ?villeLabel ?coord ?routes_court WHERE {
{
SELECT DISTINCT ?ville (GROUP_CONCAT(?l_route; separator = ', ') as ?routes) WHERE {
?item wdt:P16 wd:Q3456602 .
MINUS { VALUES ?outre_mer { wd:Q17012 wd:Q17054 wd:Q3769 wd:Q17070 wd:Q34617 wd:Q17063 wd:Q25362 wd:Q126125 } . ?item wdt:P131 ?outre_mer } .
?item p:P609/ps:P609 ?ville .
?ville p:P31/ps:P31/wdt:P279* wd:Q484170 .
OPTIONAL { ?item rdfs:label ?l_route filter (lang(?l_route) = "fr") } .
SERVICE wikibase:label { bd:serviceParam wikibase:language "fr" . }
} GROUP BY ?ville
} .
?ville wdt:P625 ?coord .
BIND(REPLACE(str(?routes), "autoroute ", "") as ?routes_court) .
SERVICE wikibase:label { bd:serviceParam wikibase:language "fr" . }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v6("?coord"):::projected
v2("?item")
v1("?l_route")
v3("?outre_mer")
v5("?routes")
v7("?routes_court"):::projected
v4("?ville"):::projected
a1((" "))
a2((" "))
a3((" "))
c1(["fr"]):::literal
c13(["bd:serviceParam"]):::iri
c3(["wd:Q3456602"]):::iri
c10(["wd:Q484170"]):::iri
v2 --"p:direct/P16"--> c3
subgraph minus0["MINUS"]
style minus0 stroke-width:6px,fill:pink,stroke:red;
bind1[/VALUES ?outre_mer/]
bind1-->v3
bind10(["wd:Q17012"])
bind10 --> bind1
bind11(["wd:Q17054"])
bind11 --> bind1
bind12(["wd:Q3769"])
bind12 --> bind1
bind13(["wd:Q17070"])
bind13 --> bind1
bind14(["wd:Q34617"])
bind14 --> bind1
bind15(["wd:Q17063"])
bind15 --> bind1
bind16(["wd:Q25362"])
bind16 --> bind1
bind17(["wd:Q126125"])
bind17 --> bind1
v2 --"p:direct/P131"--> v3
end
v2 --"p:P609"--> a1
a1 --"p:statement/P609"--> v4
v4 --"p:P31"--> a2
a2 --"p:statement/P31"--> a3
a3 --"p:direct/P279"--> c10
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."rdfs:label".-> v1
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c13 --"wikibase:language"--> c1
end
bind3[/"?l_route"/]
v1 --o bind3
bind3 --as--o v5
v4 --"p:direct/P625"--> v6
bind4[/"replace(str(?routes),'autoroute ','')"/]
v5 --o bind4
bind4 --as--o v7
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c13 --"wikibase:language"--> c1
end