Difference between revisions of "User:Aperfectring/Random image page"

From Geohashing
imported>Aperfectring
(Planning for MySQL database)
imported>Aperfectring
Line 1: Line 1:
First off, the most important part, a link: [http://aperfectring.dyndns.org/ http://aperfectring.dyndns.org/].  Be aware that this is currently running on my home computer, and the page often takes a few seconds to load.
+
First off, the most important part, a link: [http://aperfectring.dyndns.org/ http://aperfectring.dyndns.org/].  Image tagging is here: [http://aperfectring.dyndns.org/tagging.php http://aperfectring.dyndns.org/tagging.php]. Be aware that this is currently running on my home computer, and the page often takes a few seconds to load.
  
 
==What it is==
 
==What it is==

Revision as of 06:27, 22 February 2010

First off, the most important part, a link: http://aperfectring.dyndns.org/. Image tagging is here: http://aperfectring.dyndns.org/tagging.php. Be aware that this is currently running on my home computer, and the page often takes a few seconds to load.

What it is

This page currently displays 2 random expeditions photo from the geohashing wiki. An expedition photo is one which is in [[Category:Meetup in LAT LON]]. I have been slowly categorizing photos which have no categories, and I also have been adding the [[Category:Meetup in LAT LON]] to expedition images which should have it, but don't. Photos which have [[Category:GPS receivers]] are not displayed.

Usage instructions

"Report this image as a GPS receiver" buttons

In order to make these images a bit more interesting, I filter out [[Category:GPS receivers]], since there are a whole lot of photos of those on the wiki. These buttons flag the image as potentially being a GPS receiver. I will review the flagged images, and have AperfectBot add the category, if it is appropriate.

What qualifies as a GPS receiver?

A photo of a handheld GPS unit, car GPS unit, cell phone with GPS, or screenshots from any of the above. Basically anything which shows lat-lon, and could be carried by a geohasher to the hashpoint. These are generally photos of proof, and not very interesting to look at. The GPS unit should be a main focus of the image.

What if both images are GPS receivers?

There is a button below the images to report them both.

Future plans

I plan to make this page into a voting thing, in the vein of http://thefairest.info. In the meantime, just enjoy the images. I know that we geohashers aren't, in general, professional photographers, but I figure a little friendly competition will only encourage people to take some pretty photos when out and about exploring our world. This will require a lot of ranking effort by people, because we have over 20,000 images on the wiki, so in order to get meaningful results, we will need a lot of visits.

Suggestions for improvement

Could you display a link to the image, or better yet, the expedition it came from?

Yes I could. Once I get the voting thing up and running, I will display links to the images that were on the last page. The photos should be anonymous until the vote has been cast, to help keep personal bias out of it. The links will be to the images, and there should be a link to the expedition on that page.

Could you do xyz with this? Something doesn't appear to be working correctly, how do I tell you?

The best place, for now, is to tell me (aperfectring) in #geohashing on irc.foonetic.net However, you can also use the talk page here to tell me about stuff as well.

Current TODO list

The whole setup is very spaghetti code, and uses a lot of flat files. I would like to switch that up, and put all of this information into a database, but that will require some significant refactoring of the code, and a lot of relearning SQL on my part. I am up to the challenge, and I see this as a requirement before I can start in on the voting code.

Planning for MySQL database

Image info table - A row for every image on the wiki. Cached images should randomly be refreshed (0.1% chance of being redownloaded perhaps?).

Column name Type
cache_name CHAR(64)
image_name VARCHAR(65535)
number_votes INT() UNSIGNED
number_contests INT() UNSIGNED
image_cached BOOL

cat info table - rows only created once categories have been retrieved. If the suggestion flag is set, then these are proposed categories which need to be reviewed. When running an audit of suggested categories, all columns should be updated, then the suggestion flag set to false. Cached category information should be randomly refreshed (again, a 0.1% chance seems good).

Column name Type
cache_name CHAR(64)
gps_receiver BOOL
suggestion BOOL
date DATE
lat VARCHAR(3)
lon VARCHAR(4)
sign BOOL
xkcd_marker BOOL
gps_receiver BOOL
wildlife BOOL
transportation BOOL

How it currently works

  1. There is a cron job to download the list of all images on the wiki every night at midnight Pacific time.
  2. You visit the page, which is substantially written in PHP.
  3. A random image is picked from the list.
  4. The cache of thumbnailed images is checked for a copy of that image.
  5. If the image is not cached, download it, thumbnail it, and put it in the cache.
  6. If that step fails at any point, return to step 3.
  7. Get the category list for the image.
  8. If it is in "GPS receivers" return to step 3.
  9. If it is not in "Meetup in LAT LON", but is in "Meetup on YYYY-MM-DD", save the image name in a flat file noting that it need the LAT LON cat, and return to step 3.
  10. If it is in "Meetup in LAT LON" display the image.
  11. Repeat steps 3-10 to get a second image displayed.
  12. If a user clicks a "Report as GPS receiver" button, save the image name in a flat file noting that it could be a GPS receiver, and start over again.