Adapted code for querying Flickr. Taken from http://graphics.cs.cmu.edu/projects/im2gps/flickr_code.html