You are here

eric fisher

Colophon: Create your own personal Map tiles (from July 2013)

Submitted by Roland on Sat, 2014-04-12 08:16

If you want to make your own map tile out of many (100s or 1000s) of latitude longitude pairs e.g. from Vancouver flickr photos taken 2007-2011 during commuter hours (7-10am., 3-6p.m), here's how:

  • Create a file, let's call it "latlong.text" in the format "lat, long" e.g. remove the square brackets from my vancouver 2007-11 flickr commuter file
  • encode it

    • cat latlong.txt | ./encode -o vancouver2007-2011 -z 16
  • render it

    • ./render -A -- vancouver2007-2011/ 16 49.25706 -123.070538525034 49.29808542 -123.159733 > vancouver-2007-2011.try21.png

    • (you will have to play around with the lat and long to make sure they cover the area you want e.g. in the above example I made it so that bounderies were: clark park to the south and east, connaught park to the west and stanley park to the north)

  • And here's the resulting PNG map tile on flickr
  • encode and render come from @enf on twitter, the amazing Eric Fischer:

Backup your public Flickr photo metadata to MongoDB using backupPublicPhotoMetadataByDateAndUser

Submitted by Roland on Mon, 2012-02-27 01:19

If you know how to run MongoDB and ruby on your computer or your server, then backupPublicPhotoMetadataByDateAndUser.rb is a simple Ruby script to backup your Flickr metadata for yours (or anybody else's) Flickr public photos for a given time period. Simple (it doesn't replicate flickr's richness nearly as comprehensively as Aaron's parallel flickr) but effective because then you can with very very simple programming use the MongoDB query language to do useful Flickr queries such as:

1. give me all the photos in gastown

2. give me the square 75x75url of all photos in Vancouver tagged "yellow"

3. give me all the photos geo-tagged in the city of Vancouver taken in 2011 during the morning rush hour (e.g. if you wanted to do Eric Fisher-like  maps)

HOW TO RUN IT:

  1. Start up MongoDB and create some indexes: /Applications/mongodb-osx-x86_64-2.0.2/bin/mongo
    1. > db.photos.ensureIndex({id:1});
      > db.photos.ensureIndex({datetaken:1});
      > db.photos.ensureIndex({dateupload:1});
      > db.photos.ensureIndex({lastupdate:1});
  2. Set Environment variables to point to your MongoDB and your flickr api key and the userid e.g.
    1. export MONGO_PORT=27017
    2. export MONGO_HOST=127.0.0.1
    3. export FLICKR_DB=rtflickr # your flickr database name in Mongo DB
    4. export FLICKR_USER=yourfunnyFlickruserIdendinging@01
    5. create a flickr.conf file like this:
      1. Roland-Tanglaos-MacBook-Pro-2:mongoflickrbackup rolandtanglao$ cat flickr.conf
        api_key = a3b9eeatbeefdecafbad
  3. specify time and date to backup e.g. to backup your 2009 public photos:
    1. ./backupPublicPhotoMetadataByDateAndUser.rb 2009 1 1 2009 12 31  >backup.2009.stdout.txt 2>backup.2009.stderr.txt
Subscribe to RSS - eric fisher