Page MenuHomePhabricator

Unknown value for a geocoordinate returns geocoordinate for previous item in WDQS
Closed, InvalidPublic

Description

Consider this query:

SELECT ?distance ?work ?workLabel ?geo ?location ?locationLabel
WITH {
  SELECT ?work ?location ?geo ?distance WHERE {
    ?work wdt:P921 ?location . 
    ?location wdt:P625 ?other_geo . 
    wd:Q791 wdt:P625 ?geo .
    BIND(geof:distance(?other_geo, ?geo) AS ?distance)
  }
  ORDER BY ?distance
  LIMIT 100
} AS %results
WHERE {
  INCLUDE %results
          
  # Filter is expensive if earlier
  FILTER NOT EXISTS { ?work wdt:P31 wd:Q17329259 }
  
  # Label the result
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,cs,da,de,es,jp,nl,no,ru,sv,zh". }
}
ORDER BY ?distance

https://www.wikidata.org/wiki/Q18148249 (Abert Lake Petroglyphs) has unknown geocoordinates.

When used in the WDQS, a result with a geocoordinate shows up for Abert Lake Petroglyphs that is actually a geocoordinate for another returned item (New Zealand on the following line).

I would have expected it to either not show up or be blank.

Event Timeline

Fnielsen created this task.Apr 13 2018, 2:13 PM
Restricted Application added projects: Wikidata, Discovery. · View Herald TranscriptApr 13 2018, 2:13 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Smalyshev triaged this task as Medium priority.

Are you sure this is a bug in the query service? As far as I can tell, ?geo is always the coordinate location of Q791 – did you mean to select ?other_geo?

Fnielsen closed this task as Invalid.Apr 16 2018, 12:06 PM

Yes, you are right.