Maps for ipod, the right way
I was looking into putting maps in my new video ipod. This guy has a “how to”, which is no more than “capture an image from your screen, put it in the ipod.” This is a nice mashup of Yahoo driving directions and the ipod, but is serving me corrupted zip files, and it’s not too general anyway.
I wanted to have more data than what the 320×240 resolution allows, and I wanted that data to be easily accessible. The video ipod shows thumbnail images in a 6×5 grid, which will scroll down as needed. So ideally, a map would have 6xn tiles, each 320×240. The whole map should be 1920 pixels horizontally, or 320*6.
I wrote a simple python script that will take an image and generate these 6xn tiles, ready to be uploaded to the ipod. The script can also generate 5xn and 4xn tiles for the ipods photo and nano, respectively.
If you sort the files generated by name, the thumbnails will form the bigger image in the ipod’s browser. You can then use the wheel to scroll to the area of the map you want to see bigger.
I started with this map, stitched together from several screen captures:

(I’m not going to post the full res one here, because that would be against Google’s terms of use)
Once processed into tiles and uploaded to the ipod, this is how it looks:

Here is one of the tiles, at full res:

Of course, the script will work with any image you give it. Here is a map of Australia, which I photographed from an encyclopedia from 1965:

Download the script here. It requires PIL, the Python Image Library. Run it from a terminal, by typing “ipodTiles [image name]“. The script will resize the initial image to the ideal size for your type of ipod (1920 pixels for the video, 1100 for the photo or 702 for the nano), so it is not necessary to be accurate with the size of the maps. However, the closest you get to the ideal size, the closest to 1 to 1 the image in the ipod will be, and the better the legibility.
What would be great is if the ipod supported photo folders, and each forder could be assigned its own icon. That would allow for multiple zoom levels in the same map. But this works quite well as is.
February 25th, 2009 at 10:46 pm
?????????????????????????????????
February 26th, 2009 at 11:34 pm
??????????????????????
February 27th, 2009 at 11:36 pm
???????????å???????????????????????????
February 28th, 2009 at 10:52 pm
????????H??OK???????SOS
March 1st, 2009 at 11:01 pm
???????????å??????????????????????
March 2nd, 2009 at 10:54 pm
??????????????????????????????????
March 3rd, 2009 at 11:01 pm
???????????????????õ????????????????????????
March 5th, 2009 at 12:24 am
?????????????????
March 5th, 2009 at 11:53 pm
WEB????????????????????????
March 6th, 2009 at 11:09 pm
????????????????????ñ?????????
March 7th, 2009 at 11:20 pm
????????????????????å?OK??????
March 8th, 2009 at 11:08 pm
??????????OK?????å??????????
March 9th, 2009 at 10:08 pm
??????????????????????ñ???????????
March 10th, 2009 at 10:48 pm
?????????????????????????????????
March 12th, 2009 at 10:38 pm
????????????????????????????
March 13th, 2009 at 9:46 pm
???????????????????????å?????????????
March 14th, 2009 at 10:33 pm
???å???????????????????????
March 15th, 2009 at 9:37 pm
?????????????????????????????????????????????????ä?????????????????????u_u.s-yui.o.-@docomo.ne.jp??????????????
March 17th, 2009 at 12:01 am
??????????????????????????????????ä??????????????????
March 18th, 2009 at 1:18 am
???????????????????????????????????????????
March 19th, 2009 at 12:58 am
H????????????????????????????
March 19th, 2009 at 11:27 pm
?????ï???????????????????????????????^^??????????????????(*??????*)???choco0315@softbank.ne.jp
March 20th, 2009 at 10:52 pm
??????????????????????????????????????????????
March 22nd, 2009 at 10:30 pm
????????????????????????????¬?????
March 23rd, 2009 at 10:45 pm
?????¤????????ä???????????????
March 24th, 2009 at 10:19 pm
?????????????????????????????????
March 25th, 2009 at 10:09 pm
?????????????????????????????????ñ???????????
March 27th, 2009 at 11:03 pm
?????????????????????????????????????
March 29th, 2009 at 11:47 pm
???????????????????¬???????
March 30th, 2009 at 9:56 pm
??????????nana???????????????????????????H?????????????
March 31st, 2009 at 10:21 pm
????????????????????
April 1st, 2009 at 9:51 pm
?¿??????????????????????