My Blog of Japan Japan!

Posted
9 April 2009 @ 10am

Posted In:
Google Maps, Japan

Tagged
, , , , , , ,

Starbucks in Japan

Marching Band

Here’s a project I worked on, then forgot about. I used a screen scraper written in PHP to grab all the Starbucks locations in Japan to make a map. I wrote a batch geocoder to run the address results through Google Maps geocoder and recorded the latitude and longitude of each one.

With Japanese addresses, you have to be careful geocoding. If you give google the entire address, along with building name and other extras, it can’t convert it to a lat-long pair. You have to give it just to the Chome number or Banchi number. To deal with this, I wrote an extra part in the script, where if Google gave me an error code back, I’d try the same address again, cut at the last space. Thankfully, Starbucks wrote their addresses with spaces included, so it often worked.

The app itself was written in CakePHP and uses Google Maps to output the points. The data is a year old now, so there’s probably some inconsistencies there.

Starbucks in Japan Map


No Comments Yet


There are no comments yet. You could be the first!

Leave a Comment