query-b4bf25274d416bf64822e688ed46f487

rq turtle/ttl

Objects at border, but only assigned to one of the countries to one of the neighbouring countries. The poor man's approach is to map all objects, but filter away those objects having already more than one country assigned. An example for Austria and neighbouring countries. And then to find incomplete objects by checking objects at or near the border at the generated map. (P17)country I want to find border objects (objects at border between two areas, countries, etc., countries for now) that are only assigned via

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#defaultView:Map
SELECT ?item ?itemLabel ?coord (sample (?layerLabel) as ?oneLayerLabel) (count(?item) as ?countries) {
  VALUES ?country { wd:Q38 wd:Q40 wd:Q39 wd:Q183 wd:Q215}
  ?item wdt:P31 wd:Q8502 .
  ?item wdt:P17 ?country . BIND(?country AS ?layer) 
  ?item wdt:P625 ?coord . 
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
GROUP BY ?item ?itemLabel ?coord
HAVING (?countries = 1)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v5("?coord"):::projected v8("?countries") v2("?country") v3("?item"):::projected v4("?layer") v6("?layerLabel"):::projected v7("?oneLayerLabel") c7(["bd:serviceParam"]):::iri c9(["#91;AUTO_LANGUAGE#93;,en"]):::literal c3(["wd:Q8502"]):::iri f0[["?countries = '1^^xsd:integer'"]] f0 --> v8 bind1[/VALUES ?country/] bind1-->v2 bind10(["wd:Q38"]) bind10 --> bind1 bind11(["wd:Q40"]) bind11 --> bind1 bind12(["wd:Q39"]) bind12 --> bind1 bind13(["wd:Q183"]) bind13 --> bind1 bind14(["wd:Q215"]) bind14 --> bind1 v3 --"wdt:P31"--> c3 v3 --"wdt:P17"--> v2 bind2[/"?country"/] v2 --o bind2 bind2 --as--o v4 v3 --"wdt:P625"--> v5 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c7 --"wikibase:language"--> c9 end bind5[/"sample(?layerLabel)"/] v6 --o bind5 bind5 --as--o v7 bind6[/"count(?item)"/] v3 --o bind6 bind6 --as--o v8