query-9c3d8073865441306d193fbf97c10b18

rq turtle/ttl

INCLUDE %itemsOPTIONAL

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 ?url ?item ?itemLabel ?itemDescription (SAMPLE(?coords) AS ?point) 


WHERE {

   {
  SELECT ?item ?id WHERE {
    ?item wdt:P1343 wd:Q105770461 .
#    ?item wdt:P31 wd:Q2116450 .
    ?item wdt:P3029 ?id 
  }
}.  
  ?item (wdt:P276|wdt:P131)/wdt:P625 ?coords.

  # BIND(IRI(CONCAT("https://discovery.nationalarchives.gov.uk/details/c/", ?id)) AS ?url)
  # wd:P3029 wdt:P1630 ?fmt .
  # BIND(IRI(REPLACE(?fmt, "\\$1", ?id)) AS ?url)
  # BIND(IRI(REPLACE(?id, '(^.*$)', ?fmt)) AS ?url) .

  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} GROUP BY ?url ?item ?itemLabel ?itemDescription
ORDER BY ?item

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?coords"):::projected v2("?id") v1("?item"):::projected v4("?point") a1((" ")) c8(["bd:serviceParam"]):::iri c10(["#91;AUTO_LANGUAGE#93;,en"]):::literal c2(["wd:Q105770461"]):::iri v1 --"wdt:P1343"--> c2 v1 --"wdt:P3029"--> v2 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P131"--> a1 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P276"--> a1 end union0r <== or ==> union0l end a1 --"wdt:P625"--> v3 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c8 --"wikibase:language"--> c10 end bind1[/"sample(?coords)"/] v3 --o bind1 bind1 --as--o v4