query-c6b3cbe202d2bafed016b397f42a1345

rq turtle/ttl

"městno"

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX psv: <http://www.wikidata.org/prop/statement/value/>
PREFIX p: <http://www.wikidata.org/prop/>
#---------------------------------------------------------------------------------------
# objekty w Njeswačanskej gmejnje, městno
#---------------------------------------------------------------------------------------
#defaultView:Table;Map
SELECT distinct ?item ?is ?isLabel ?itemLabel_hsb ?lat ?lon ?adresa ?wjes
WHERE {    
  ?item (wdt:P131/wdt:P279*) wd:Q93265 .  # Liegt in Verwaltungseinheit Puschwitz (oder Unterklasse)
  OPTIONAL {?item p:P625 ?coordinate.
  ?coordinate psv:P625 ?coordinate_node.
  ?coordinate_node wikibase:geoLatitude ?lat.
  ?coordinate_node wikibase:geoLongitude ?lon. }
  OPTIONAL { ?item wdt:P31 ?is . }
  OPTIONAL { ?item wdt:P6375 ?adresa . }
  OPTIONAL { ?item wdt:P276 ?wjes . }
  OPTIONAL { ?item rdfs:label ?itemLabel_hsb . FILTER(lang(?itemLabel_hsb)='hsb') }
  FILTER NOT EXISTS {?item wdt:P31 wd:Q262166} # ist keine Gemeinde
  FILTER NOT EXISTS {?item wdt:P31 wd:Q253019} # ist kein Gemeindeteil
  FILTER NOT EXISTS {?item wdt:P31 wd:Q532} # ist kein Dorf
  FILTER NOT EXISTS {?item wdt:P31 wd:Q4022} # ist kein Fluss
  FILTER NOT EXISTS {?item wdt:P31 wd:Q54050} # ist kein Hügel
}
ORDER BY ?item

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v8("?adresa"):::projected v3("?coordinate") v4("?coordinate_node") v7("?is"):::projected v1("?item"):::projected v2("?itemLabel_hsb"):::projected v5("?lat"):::projected v6("?lon"):::projected v9("?wjes"):::projected a1((" ")) c10(["wd:Q93265"]):::iri c2(["wd:Q54050"]):::iri c4(["wd:Q532"]):::iri c5(["wd:Q253019"]):::iri c3(["wd:Q4022"]):::iri c6(["wd:Q262166"]):::iri f0[["not "]] subgraph f0e0["Exists Clause"] e0v1 --"p:direct/P31"--> e0c2 e0v1("?item"):::projected e0c2(["wd:Q54050"]):::iri end f0--EXISTS--> f0e0 f0 --> v1 f0 --> c1 f0 --> c2 v1 --"p:direct/P31"--> c2 f1[["not "]] subgraph f1e1["Exists Clause"] e1v1 --"p:direct/P31"--> e1c2 e1v1("?item"):::projected e1c2(["wd:Q4022"]):::iri end f1--EXISTS--> f1e1 f1 --> v1 f1 --> c1 f1 --> c3 v1 --"p:direct/P31"--> c3 f2[["not "]] subgraph f2e2["Exists Clause"] e2v1 --"p:direct/P31"--> e2c2 e2v1("?item"):::projected e2c2(["wd:Q532"]):::iri end f2--EXISTS--> f2e2 f2 --> v1 f2 --> c1 f2 --> c4 v1 --"p:direct/P31"--> c4 f3[["not "]] subgraph f3e3["Exists Clause"] e3v1 --"p:direct/P31"--> e3c2 e3v1("?item"):::projected e3c2(["wd:Q253019"]):::iri end f3--EXISTS--> f3e3 f3 --> v1 f3 --> c1 f3 --> c5 v1 --"p:direct/P31"--> c5 f4[["not "]] subgraph f4e4["Exists Clause"] e4v1 --"p:direct/P31"--> e4c2 e4v1("?item"):::projected e4c2(["wd:Q262166"]):::iri end f4--EXISTS--> f4e4 f4 --> v1 f4 --> c1 f4 --> c6 v1 --"p:direct/P31"--> c6 v1 --"p:direct/P131"--> a1 a1 --"p:direct/P279"--> c10 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v1 -."p:P625".-> v3 v3 --"p:statement/value/P625"--> v4 v4 --"wikibase:geoLatitude"--> v5 v4 --"wikibase:geoLongitude"--> v6 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v1 -."p:direct/P31".-> v7 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v1 -."p:direct/P6375".-> v8 end subgraph optional3["(optional)"] style optional3 fill:#bbf,stroke-dasharray: 5 5; v1 -."p:direct/P276".-> v9 end subgraph optional4["(optional)"] style optional4 fill:#bbf,stroke-dasharray: 5 5; v1 -."rdfs:label".-> v2 end