query-1c309cd91583bab6c835b7b2322b78af

rq turtle/ttl

19:43, 3 March 2018 (UTC)) talk (Doc Taxon but I only want to get: 11.06342 49.37388 with this I get: Point(11.06342 49.37388)

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX psv: <http://www.wikidata.org/prop/statement/value/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?BLfD_ID ?item ?itemLabel ?itemDescription ?latlon ?address WHERE {
  ?item wdt:P4244 ?BLfD_ID .                      # item has a P4244
  MINUS { ?item wdt:P18 [] } .                    # item has no image
  MINUS { ?item wdt:P373 [] } .                   # item has no Commonscat
  OPTIONAL { ?item p:P625 ?coord .
             ?coord psv:P625 ?coord_node .
             ?coord_node wikibase:geoLongitude ?lon .
             ?coord_node wikibase:geoLatitude ?lat .
             BIND(CONCAT(STR (?lat), " ", STR(?lon)) AS ?latlon).
           }           # show coordinates
  OPTIONAL { ?item wdt:P969 ?address . }          # show address
  FILTER(SUBSTR(?BLfD_ID,1,11)="D-5-64-000-")     # P4244 value starts with D-5-64-000-
  SERVICE wikibase:label { bd:serviceParam wikibase:language "de,[AUTO_LANGUAGE]". }
}
ORDER BY ?BLfD_ID

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?BLfD_ID"):::projected v8("?address"):::projected v3("?coord") v4("?coord_node") v2("?item"):::projected v6("?lat") v7("?latlon"):::projected v5("?lon") a1((" ")) a2((" ")) c13(["bd:serviceParam"]):::iri c15(["de,#91;AUTO_LANGUAGE#93;"]):::literal f0[["substring(?BLfD_ID,'1^^xsd:integer','11^^xsd:integer') = 'D-5-64-000-'"]] f0 --> v1 v2 --"p:direct/P4244"--> v1 subgraph minus1["MINUS"] style minus1 stroke-width:6px,fill:pink,stroke:red; v2 --"p:direct/P18"--> a1 end subgraph minus2["MINUS"] style minus2 stroke-width:6px,fill:pink,stroke:red; v2 --"p:direct/P373"--> a2 end subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v2 -."p:P625".-> v3 v3 --"p:statement/value/P625"--> v4 v4 --"wikibase:geoLongitude"--> v5 v4 --"wikibase:geoLatitude"--> v6 bind3[/"concat(str(?lat),' ',str(?lon))"/] v6 --o bind3 v5 --o bind3 bind3 --as--o v7 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v2 -."p:direct/P969".-> v8 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c13 --"wikibase:language"--> c15 end