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

TASK DESCRIPTION

Per https://www.mediawiki.org/wiki/Wikidata_query_service/User_Manual#Search_within_box and https://phabricator.wikimedia.org/T139823
the following should be supported

wikibase:cornerSouthWest The south-west corner of the box.
wikibase:cornerNorthEast The north-east corner of the box.
wikibase:cornerSouthEast The south-east corner of the box.
wikibase:cornerNorthWest The north-west corner of the box.

This feature request suggests to add the following:
wikibase:cornerWest A west corner of the box.
wikibase:cornerEast An east corner of the box.

Depending on the https://en.wikipedia.org/wiki/Latitude value, the server would determine if it was S or N.
If latitude of W > latitude of E = W is NW, E is SE,
otherwise it's SW and NE.

Sample query, based on the current sample one, should give comparable results:

Schools between San Jose, CA and Sacramento, CA
#defaultView:Map
SELECT * WHERE {

wd:Q986857 wdt:P625 ?SJloc .
wd:Q2396418 wdt:P625 ?SCloc .
SERVICE wikibase:box {

  ?place wdt:P625 ?location .
  bd:serviceParam wikibase:cornerWest ?SJloc .
  bd:serviceParam wikibase:cornerEast ?SCloc .
}

?place wdt:P31/wdt:P279* wd:Q3914 .

}

Link: https://query.wikidata.org/#%23Schools%20between%20San%20Jose%2C%20CA%20and%20Sacramento%2C%20CA%0A%23defaultView%3AMap%0ASELECT%20%2a%20WHERE%20%7B%0A%0Awd%3AQ986857%20wdt%3AP625%20%3FSJloc%20.%0Awd%3AQ2396418%20wdt%3AP625%20%3FSCloc%20.%0ASERVICE%20wikibase%3Abox%20%7B%0A%20%20%20%20%3Fplace%20wdt%3AP625%20%3Flocation%20.%0A%20%20%20%20bd%3AserviceParam%20wikibase%3AcornerWest%20%3FSJloc%20.%0A%20%20%20%20bd%3AserviceParam%20wikibase%3AcornerEast%20%3FSCloc%20.%0A%20%20%7D%0A%3Fplace%20wdt%3AP31%2Fwdt%3AP279%2a%20wd%3AQ3914%20.%0A%0A%7D


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

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