User:Bouzinac/Frontières
Objects on borders : do they have a part of (P361) ? edit
select
?item ?itemLabel
(SAMPLE(?coor) as ?coor)
(group_concat(DISTINCT ?natureLabel) as ?NATURE)
(group_concat(DISTINCT ?paysLabel; separator=", ") as ?PAYS)
(group_concat(DISTINCT ?partiedeLabel; separator=" // ") AS ?partiedeL)
WHERE
{
{ SELECT ?item ?itemLabel ?nature ?natureLabel ?coor ?pays ?paysLabel ?partiede ?partiedeLabel
WHERE
{
?item wdt:P31/wdt:P279* wd:Q25296884 .
MINUS { ?item (wdt:P31/wdt:P279*) wd:Q4366834. } # exclude cours d'eau
MINUS { ?item (wdt:P31/wdt:P279*) wd:Q218719. } # exclude contr^le frontalier
MINUS { ?item wdt:P361 wd:Q3089219. } #Remove maritime borders
MINUS { ?item (wdt:P31/wdt:P279*) wd:Q1402443. } # exclude railway station border
MINUS { ?item wdt:P361 wd:Q1292279. } #Remove political borders (not international)
MINUS { ?item wdt:P361 wd:Q67457910. } #Remove municipal borders
MINUS { ?item wdt:P361 wd:Q67218438. } #Remove air borders
MINUS { ?item wdt:P576 _:b2. }
MINUS { ?item p:P361 [ps:P361 wd:Q1292279 ; pq:P576 ?P576 ] . }
?item wdt:P31 ?nature.
?item wdt:P17 ?pays.
OPTIONAL { ?item wdt:P361 ?partiede }
OPTIONAL { ?item wdt:P625 ?coor }
BIND(COALESCE(?partiede,"vide") AS ?variable).
filter(?variable="vide")
SERVICE wikibase:label { bd:serviceParam wikibase:language "fr,en" }
} #
} #
} group by ?item ?itemLabel
Borders between European Union and non European countries edit
#defaultView:Map
SELECT distinct ?item ?itemLabel ?coord WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
?item wdt:P31 wd:Q757292 .#checkpoints
?item wdt:P361*/wdt:P31/wdt:P279* wd:Q67147037 . #located on a UE border
?item wdt:P17*/wdt:P463* wd:Q458. #in a European Union country
MINUS { ?item wdt:P576 _:b2. } #Remove dissolved
MINUS { ?item wdt:P361 wd:Q3089219. } #Remove maritime borders
MINUS { ?item wdt:P361 wd:Q67457910. } #Remove municipal/cities borders
MINUS { ?item wdt:P361 wd:Q700754. } #Remove RFA-RDA borders
MINUS { ?item wdt:P361 wd:Q67218438. } #Remove air borders
OPTIONAL { ?item wdt:P625 ?coord. }
}
Borders of country A and B edit
#defaultView:Map
select
?item ?itemLabel
(SAMPLE(?coor) as ?coor)
(group_concat(DISTINCT ?natureLabel) as ?NATURE)
(group_concat(DISTINCT ?paysLabel; separator=", ") as ?PAYS)
(group_concat(DISTINCT ?partiedeLabel; separator=" // ") AS ?partiedeL)
(group_concat(DISTINCT ?adjacentLabel; separator=" // ") AS ?adjacentL)
WHERE
{
{ SELECT ?item ?itemLabel ?nature ?natureLabel ?coor ?pays ?paysLabel ?partiede ?partiedeLabel ?adjacent ?adjacentLabel
WHERE
{
?item wdt:P31/wdt:P279* wd:Q757292 .
?item wdt:P361 wd:Q119515.#border of country A AND B
OPTIONAL { ?item wdt:P3032 ?adjacent}
MINUS { ?item (wdt:P31/wdt:P279*) wd:Q4366834. } # exclude cours d'eau
MINUS { ?item (wdt:P31/wdt:P279*) wd:Q218719. } # exclude contr^le frontalier
MINUS { ?item wdt:P361 wd:Q3089219. } #Remove maritime borders
MINUS { ?item (wdt:P31/wdt:P279*) wd:Q1402443. } # exclude railway station border
MINUS { ?item wdt:P361 wd:Q1292279. } #Remove political borders (not international)
MINUS { ?item wdt:P361 wd:Q67457910. } #Remove municipal borders
MINUS { ?item wdt:P361 wd:Q67218438. } #Remove air borders
MINUS { ?item wdt:P576 _:b2. }
MINUS { ?item p:P361 [ps:P361 wd:Q1292279 ; pq:P576 ?P576 ] . }
?item wdt:P31 ?nature.
?item wdt:P17 ?pays.
OPTIONAL { ?item wdt:P361 ?partiede }
OPTIONAL { ?item wdt:P625 ?coor }
SERVICE wikibase:label { bd:serviceParam wikibase:language "fr,en" }
} #
} #
} group by ?item ?itemLabel
Borders between Schengen zone and outside Schengen edit
#defaultView:Map
SELECT distinct ?item ?itemLabel ?coord WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
?item wdt:P361*/wdt:P31/wdt:P279* wd:Q757292 .#checkpoints
?item wdt:P361*/wdt:P31/wdt:P279* wd:Q67371697 . #located on a Schengen border
MINUS { ?item wdt:P576 _:b2. } #Remove dissolved
MINUS { ?item wdt:P361 wd:Q17163396. } #Remove open borders
MINUS { ?item wdt:P361 wd:Q3089219. } #Remove maritime borders
MINUS { ?item wdt:P361 wd:Q700754. } #Remove RFA-RDA borders
MINUS { ?item wdt:P361 wd:Q67218438. } #Remove air borders
MINUS { ?item wdt:P361 wd:Q67457910. } #Remove municipal/cities borders
OPTIONAL { ?item wdt:P625 ?coord. }
}
Border dots between North Ireland and Ireland edit
#defaultView:Map
SELECT ?front ?frontLabel ?nature ?natureLabel ?coord WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
?front wdt:P361 wd:Q670200 .
OPTIONAL { ?front wdt:P31 ?nature. }
OPTIONAL { ?front wdt:P625 ?coord. }
}
ORDER BY (?coord )
Border posts of Cyprus edit
#defaultView:Map
SELECT distinct ?item ?itemLabel ?coord WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
VALUES ?borders { wd:Q91090320 wd:Q15974882 }
?item wdt:P361*/wdt:P31*/wdt:P279* wd:Q757292 .#checkpoints
?item wdt:P361*/wdt:P31*/wdt:P279* ?borders.
OPTIONAL { ?item wdt:P625 ?coord. }
}
Iran border posts edit
Frontières 2 à faire edit
SELECT ?item ?itemLabel ?qualifier ?qualifierLabel ?statutLabel ?pays ?paysLabel
WHERE {
?item p:P31 ?statut_statement .
?statut wdt:P279 wd:Q1292279 .
?statut_statement ps:P31 ?statut .
OPTIONAL { ?item p:P31 [ pq:P642 ?qualifier ] }
OPTIONAL { ?item wdt:P17 ?pays. }
SERVICE wikibase:label { bd:serviceParam wikibase:language "fr". }
}