Esc3300 created this task.
Esc3300 added projects: Wikidata-Query-Service, Wikidata.
Herald added subscribers: Zppix, Aklapper.
Herald added a project: Discovery.

TASK DESCRIPTION

The sample at https://www.mediawiki.org/wiki/Wikidata_query_service/User_Manual#Search_within_box currently requires entry through coordinates on an item.

  • wd:Q986857 has the coordinates
  • "wd:Q986857 wdt:P625 ?SJloc" assigns them to ?SJloc
  • "bd:serviceParam wikibase:cornerNorthWest ?SJloc" uses them

It should be possible to define them directly in the query (maybe it is, but it's not documentated). Sample:

SELECT * WHERE {

SERVICE wikibase:box {
    ?place wdt:P625 ?location .
    bd:serviceParam wikibase:cornerSouthWest Point(-121.872777777 37.304166666) .
    bd:serviceParam wikibase:cornerNorthEast Point(-121.486111111 38.575277777) .
  }
?place wdt:P31/wdt:P279* wd:Q3914 .

}

Or at least:

SELECT * WHERE {

BIND(Point(-121.872777777 37.304166666) as ?SJloc)
BIND(Point(-121.486111111 38.575277777) as ?SCloc)
SERVICE wikibase:box {
    ?place wdt:P625 ?location .
    bd:serviceParam wikibase:cornerSouthWest ?SJloc .
    bd:serviceParam wikibase:cornerNorthEast ?SCloc .
  }
?place wdt:P31/wdt:P279* wd:Q3914 .

}


TASK DETAIL
https://phabricator.wikimedia.org/T139826

EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Esc3300
Cc: Aklapper, Esc3300, Zppix, Avner, debt, Gehel, D3r1ck01, Jonas, FloNight, Xmlizer, Izno, jkroll, Smalyshev, Wikidata-bugs, Jdouglas, aude, Deskana, Manybubbles, Mbch331
_______________________________________________
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to