Skip to content

All your locations are belong to us

A recent push for a UK photography contest reminded me of an issue I have begrudged for a quite a while. On the talk page for that contest, I pointed to several tools of mine, dealing with images and locations. But they only show aspects of those, like “Wikidata items without images”. What about the others? WDQS can show maps of all Wikidata items in a region, but what about Wikipedia? The mobile app can show you things with Wikipedia articles nearby, but what about Commons? I don’t recall a way to see Commons images taken near a location (WD-FIST can find them, but without a map). The data exists, but is either hard to get to, or “siloed” in some tool/app.

Screen Shot 2016-08-20 at 18.06.26Wouldn’t it be great to get a map with all this information on it? All of Wikidata? All of Wikipedia? All of Commons? At once?

What should that look like? The photography contest scenario, and change in general web usage patterns, suggest a strong emphasis on mobile. Which in turn tends to be “no frills”, as in, a focus on what is important: The map, and the objects on it.

So I decided (for the time being) to get rid of the query functions in WD-FIST, and the clutter in WikiShootMe, and start from scratch, with (essentially) just a big map, using the bleeding-edge versions of JS libraries like bootstrap, jQuery, and leaflet. So without further ado, I present WikiShootMe, version 3 (pre-alpha). As it is, the tool defaults to your coordinates, which may be your local hub (as in my case, in the screenshot). There are four layers, which can be individually toggled:

  1. Wikidata items with images (in green)
  2. Wikidata items without image (in red, the Wikipedia will change with your language selection)
  3. Commons images (in blue)
  4. Wikipedia articles (smaller, in yellow, mostly overlapping Wikidata items)

There is also a grey circle in the center, which is your (or your local hub’s) position. On mobile, this should move with you (but I haven’t tested that, as it would require leaving the house). All of these have a pop-up, when you click or touch the circle. It shows the linked title of the object, and, for Wikidata items with images and Commons images, it shows the respective image.

All these data sources will update when you move the map, as well as zoom, up to a certain zoom factor. Below that, an “Update” button will appear to update manually, but it can take a long time, even with the number of objects limited.

Screen Shot 2016-08-20 at 18.46.05I find it amazing how many geo-coded images there are already on Commons (even though the API will only give me 500 at a time). Maybe that is the geograph effect here in the UK, which let to the import of hundreds of thousands of free images to Commons.But I also found a funny pattern in Cologne, Germany, which turned out to be a series of images taken by Wikimedia volunteers from a balloon!

Now, to be extra clever, I tried to add an upload function to the pop-up of Wikidata items without an image. You can select a file from disk, or use the camera as a source on mobile. It will pre-fill the title and the {{Information}} template with a link to the respective Wikidata object. However, several problems occur with that:

  • I only could get the “old” Commons upload page to work with the pre-filled data
  • I could find no documentation on <form> parameters for the Upload wizard
  • I haven’t actually tested if the upload works
  • There seems to be no way to automatically add the uploaded image to the Wikidata item

A way around all that would be to upload the image to the tool itself, then transfer it to Commons via OAuth. This would also allow me to add the new image as the P18 on the Wikidata item. This is an option to be explored, especially if the Upload Wizard remains opaque to me.

Update: I have added OAuth to the tool. Once authorised, you can upload a new image for a Wikidata item from both desktop and mobile (gallery or camera directly) with one click. It fills in file name, coordinates, default license etc. It even adds the image to the item after upload automatically. All this opens in a new tab, on the page for the uploaded image, to give you a chance to add more information.

As usual, I am quite open for bug reports, feature requests (yes, it’s bare-bones at the moment), and technical support by volunteers/WMF.

16 Comments


  1. Fatal error: Uncaught Error: Call to undefined function ereg() in /home/www/wordpress/wp-content/themes/veryplaintxt/functions.php:183 Stack trace: #0 /home/www/wordpress/wp-content/themes/veryplaintxt/comments.php(33): veryplaintxt_commenter_link() #1 /home/www/wordpress/wp-includes/comment-template.php(1510): require('/home/www/wordp...') #2 /home/www/wordpress/wp-content/themes/veryplaintxt/single.php(41): comments_template() #3 /home/www/wordpress/wp-includes/template-loader.php(77): include('/home/www/wordp...') #4 /home/www/wordpress/wp-blog-header.php(19): require_once('/home/www/wordp...') #5 /home/www/wordpress/index.php(17): require('/home/www/wordp...') #6 {main} thrown in /home/www/wordpress/wp-content/themes/veryplaintxt/functions.php on line 183