query-0741178c20f054e55ecc3f085e9ed970

rq turtle/ttl

TODO

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX dct: <http://purl.org/dc/terms/>
PREFIX bd: <http://www.bigdata.com/rdf#>
CONSTRUCT {
  ?place a skos:Concept; 
           skos:prefLabel ?placeLabel;
           skos:exactMatch ?osgeo;
           skos:exactMatch ?tgn;
           skos:exactMatch ?geonames ;
           skos:exactMatch ?pleiades ;
           dct:coverage ?coord .
}
WHERE {
  ?place wdt:P1667 "7015539" .
  OPTIONAL {?place wdt:P3120 ?osgeoid .
    BIND (uri(concat("http://data.ordnancesurvey.co.uk/id/", ?osgeoid)) as ?osgeo)
  }
  OPTIONAL {?place wdt:P1667 ?tgnid .
    BIND (uri(concat("http://vocab.getty.edu/tgn/", ?tgnid)) as ?tgn)}
  OPTIONAL {?place wdt:P1566 ?geonamesid .
    BIND (uri(concat("http://sws.geonames.org/", ?geonamesid, "/")) as ?geonames)}
  OPTIONAL {?place wdt:P1584 ?pleiadesid .
    BIND (uri(concat("https://pleiades.stoa.org/places/", ?pleiadesid)) as ?pleiades)}
  OPTIONAL {?place p:P625/ps:P625 ?coord}
  SERVICE wikibase:label {
    bd:serviceParam wikibase:language "en"
  }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v12("?_const_4171603_uri") v16("?_const_72b9d478_uri") v15("?_const_73e8c46b_uri") v13("?_const_c9f3cb8c_uri") v11("?_const_f5e5585a_uri") v10("?coord"):::projected v16("?geonames"):::projected v6("?geonamesid"):::projected v16("?osgeo"):::projected v2("?osgeoid"):::projected v1("?place"):::projected v14("?placeLabel"):::projected v16("?pleiades"):::projected v8("?pleiadesid"):::projected v16("?tgn"):::projected v4("?tgnid"):::projected a1((" ")):::projected c9(["bd:serviceParam"]):::iri c2(["7015539"]):::literal c11(["en"]):::literal v1 --"p:direct/P1667"--> c2 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v1 -."p:direct/P3120".-> v2 bind0[/"concat('http://data.ordnancesurvey.co.uk/id/',?osgeoid)"/] v2 --o bind0 bind0 --as--o v16 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v1 -."p:direct/P1667".-> v4 bind1[/"concat('http://vocab.getty.edu/tgn/',?tgnid)"/] v4 --o bind1 bind1 --as--o v16 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v1 -."p:direct/P1566".-> v6 bind2[/"concat('http://sws.geonames.org/',?geonamesid,'/')"/] v6 --o bind2 bind2 --as--o v16 end subgraph optional3["(optional)"] style optional3 fill:#bbf,stroke-dasharray: 5 5; v1 -."p:direct/P1584".-> v8 bind3[/"concat('https://pleiades.stoa.org/places/',?pleiadesid)"/] v8 --o bind3 bind3 --as--o v16 end subgraph optional4["(optional)"] style optional4 fill:#bbf,stroke-dasharray: 5 5; v1 -."p:P625".-> a1 a1 --"p:statement/P625"--> v10 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c9 --"wikibase:language"--> c11 end bind4[/""a""/] bind4 --as--o v11 bind5[/"'skos:Concept'"/] bind5 --as--o v12 bind6[/"'skos:prefLabel'"/] bind6 --as--o v13 bind7[/"?placeLabel"/] v14 --o bind7 bind7 --as--o v14 bind8[/"'skos:exactMatch'"/] bind8 --as--o v15 bind9[/"?osgeo"/] v16 --o bind9 bind9 --as--o v16 bind10[/"?tgn"/] v16 --o bind10 bind10 --as--o v16 bind11[/"?geonames"/] v16 --o bind11 bind11 --as--o v16 bind12[/"?pleiades"/] v16 --o bind12 bind12 --as--o v16 bind13[/"'dct:coverage'"/] bind13 --as--o v16