I had a really cool idea of something to do today but realised that Commons has no geodata. How can we change this? (I'd expect to be able to see nearby photos on http://commons.wikimedia.org/w/index.php?title=Special:Nearby)
If you know what articles there are for a given location, then you can look up the images associated with the articles. e.g.
http://en.wikipedia.org/w/api.php?action=query&generator=images&titl...
You should get some JSON like this:
{ "query": { "pages": { "-1": { "contentmodel": "wikitext", "missing": "", "ns": 6, "pagelanguage": "en", "title": "File:Auguste Rodin - Grubleren 2005-02.jpg" }, "-2": { "contentmodel": "wikitext", "missing": "", "ns": 6, "pagelanguage": "en", "title": "File:Flaming Sword by Matthew Bisanz.JPG" }, "-3": { "contentmodel": "wikitext", "missing": "", "ns": 6, "pagelanguage": "en", "title": "File:JEFraser 2ndDivMemorial.jpg" } } } }
I think you can follow these instructions [1] to figure out the URL from a thumbnail. For example if you are looking for File:Flaming Sword by Matthew Bisanz.JPG, you can calculate the md5 for the filename:
9a06f2a830f1a0b67c50df1e5b5a2a5c
and then use the first character, and then the first two characters to construct a URL like this:
http://upload.wikimedia.org/wikipedia/commons/thumb/9/9a/Flaming_Sword_by_Ma...
You can adjust the pixel size as needed. The big assumption here is that the images are directly relevant to the article...which may be too big a leap, but it might be interesting to try it out.
//Ed
[1] https://www.mediawiki.org/wiki/Manual:$wgHashedUploadDirectory
On Fri, Jun 21, 2013 at 7:01 PM, Jon Robson jdlrobson@gmail.com wrote:
I had a really cool idea of something to do today but realised that Commons has no geodata. How can we change this? (I'd expect to be able to see nearby photos on http://commons.wikimedia.org/w/index.php?title=Special:Nearby)
Mobile-l mailing list Mobile-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mobile-l
On 22.06.2013, 3:01 Jon wrote:
I had a really cool idea of something to do today but realised that Commons has no geodata. How can we change this? (I'd expect to be able to see nearby photos on http://commons.wikimedia.org/w/index.php?title=Special:Nearby)
If you want to see images on Nearby, you should probably request them, not NS_MAIN;)
I was keen to get the file pages corresponding to images on commons. I was imagining that some file pages would have coordinates on them corresponding to any geo data in the exif information
Fundamentally http://commons.wikimedia.org/w/index.php?title=Special:Nearby Should work exactly the same as wikipedia no? Seems like a crying shame...
Use case: Given I am at the Taj Mahal the nearby page should show me a load of pages with photos of the Taj Mahal. I've created a bug to capture it https://bugzilla.wikimedia.org/show_bug.cgi?id=50133
On Sat, Jun 22, 2013 at 1:51 AM, Max Semenik maxsem.wiki@gmail.com wrote:
On 22.06.2013, 3:01 Jon wrote:
I had a really cool idea of something to do today but realised that Commons has no geodata. How can we change this? (I'd expect to be able to see nearby photos on http://commons.wikimedia.org/w/index.php?title=Special:Nearby)
If you want to see images on Nearby, you should probably request them, not NS_MAIN;)
-- Best regards, Max Semenik ([[User:MaxSem]])