query-448d4253060c5dc7fa6601a9dc721bc7

rq turtle/ttl

). So the query not only can give missing P18 values in Wikidata, but also wrong values in Commons. (Q6172932)Jeep Wrangler Unlimited above. I noted that one of the first found item, when I ran the query, was a Wikimedia disambiguation page (Tagishsimon). Credit: The query is based on query by (P1259)coordinates of the point of view : Here is query using geographical search in a box. You can change the two specified coordinates for the corners of the box as you like, and also change the coordinate predicate (here Syced@

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX schema: <http://schema.org/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX geo: <http://www.opengis.net/ont/geosparql#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?P180 ?l ?d ?file ?image
WHERE
{

{
  SELECT ?P180 ?file
  WHERE 
  {
    ?file wdt:P180 ?P180 .
    SERVICE wikibase:box
    {
      ?file wdt:P1259 ?location .
      bd:serviceParam wikibase:cornerWest "Point(-121.872777777 37.304166666)"^^geo:wktLiteral .
      bd:serviceParam wikibase:cornerEast "Point(-121.486111111 38.575277777)"^^geo:wktLiteral .
    }
  }
}  SERVICE <https://query.wikidata.org/sparql>
  {
    OPTIONAL { ?P180 wdt:P18 ?img }
    FILTER (!BOUND(?img))
    SERVICE wikibase:label { bd:serviceParam wikibase:language "en". ?P180 rdfs:label ?l . ?P180 schema:description ?d }
  }
  ?file schema:url ?image.
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?P180"):::projected v6("?d"):::projected v1("?file"):::projected v7("?image"):::projected v4("?img") v5("?l"):::projected v3("?location") c6([sPoint(-121.872777777 37.304166666)^^<http://www.opengis.net/ont/geosparql#wktLiteral>"]):::literal c13(["en"]):::literal c4(["bd:serviceParam"]):::iri c8([sPoint(-121.486111111 38.575277777)^^<http://www.opengis.net/ont/geosparql#wktLiteral>"]):::literal v1 --"wdt:P180"--> v2 subgraph s1["http://wikiba.se/ontology#box"] style s1 stroke-width:4px; v1 --"wdt:P1259"--> v3 c4 --"wikibase:cornerWest"--> c6 c4 --"wikibase:cornerEast"--> c8 end subgraph s2["https://query.wikidata.org/sparql"] style s2 stroke-width:4px; f0[["not bound(?img)"]] f0 --> v4 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P18".-> v4 end subgraph s3["http://wikiba.se/ontology#label"] style s3 stroke-width:4px; c4 --"wikibase:language"--> c13 v2 --"rdfs:label"--> v5 v2 --"schema:description"--> v6 end end v1 --"schema:url"--> v7