On Tuesday night my friend Brian and I tried out a new restaurant in Tokyo. An Izakaya is a tiny bar that also serves food, popular with Salarymen. Usually the food is huddled way over on the unhealthy end of the spectrum, but we found a macrobiotic one with good reviews. We sat there bemoaning how difficult it is to find places in Tokyo. Streets don't have names and the address system is a bit confusing. The conversation moved on to talking about how difficult it is to express a location to someone. GPS coordinates are awkward, google maps links can't be sent by SMS or over the phone, and not everywhere has an address. Even some addresses are confusing enough that they get miscommunicated. And how do you concisely give someone the exact location for "that bridge in the middle of the park"?
Is there a better way, we wondered? Could a location be expressed in just a short string of characters?
As I walked home, my mind was churning trying to figure out just how short of a string I could pack any location on earth into. As soon as I got home I visited wolframalpha.com, using it for a legitimate purpose for the very first time.
Consumer GPS devices have a resolution of about one square meter, which seemed to be the appropriate range to aim for. I was tempted to go for ten meters to make the string shorter, but decided it would be too inexact.
So, into Wolfram I put in "Surface area of planet earth in square meters". That gave me a fifteen digit long number, meaning that if I wanted to stick to just decimals, the new notation would have to be fifteen characters long. Too long.
I took that number (5100000000000000) and put into Wolfram "5100000000000000 in Base 36", which represents how long the string would be if I used all of the letters and numbers. That gave me a ten digit number, which was still longer than I wanted.
I changed base 36 to base 62, which represents all of the upper (26) and lowercase (26) letters as well as numbers (10). That gave me nine digits, but the first one was a two, meaning that it was just barely over twice as many locations as I'd need to get down to eight. I decided to split the globe in half and add a plus or minus to the beginning.
That brought me down to just about 20% more locations than I would need for eight digits. To bridge the gap I cut off everything above and below the northernmost and southernmost cities with 1000 residents respectively. I also had to stretch the map just slightly (4%), which resulted in a slight decrease in accuracy, but I thought it worth it for a shorter string.
The biggest technical problem followed. Although there were enough locations in my narrowed-down field, there wasn't an easy way to use them all. That's because the maximum latitude or longitude that a four character alphanumeric string could hold was about 167.00000. I needed 179.99999 for the latitude, but only around 126.00000 for the longitude. In other words, I couldn't just have a pair of four character strings; I needed to "borrow" the extra space from the longitude and use it for the latitude. This took me a full twenty-four hours to figure out, and by figure out, I really just mean that I posted it to quora.com and a really nice guy told me how to do it.
Hey, it's not all glory.
The next two days were spent learning how to use the Google Maps API and throw the whole thing together in a usable fashion. It could still use a bit of work, my code desperately needs to be cleaned up, and I need to make a mobile version for phones / Kindle, but enough functionality is there that I think people will find it a useful service.
To check it out, go to ToFind.Me and search for an address in the search box. You can also click the map to "unfreeze" the findme code and it will update as you move the mouse around until you click again.
I'd love to hear your feedback... is this useful to you? Could I change it to be more useful to you? Do you want to make an iPhone or Android app for it?
If you're in Tokyo, check out the cool bar/restaurant in the basement here: http://ToFind.Me/+remkjuka. It's built out like a cave. I didn't eat there, but my friends did and they really liked it.
Since photos of me slumped in a couch eating mikan oranges while programming aren't exciting, here's a picture Todd took when we were on the roof of this building.
I don't have a picture yet, but I got to visit NHK (like the BBC of Japan) because my friend Miwa works there. It was really fun playing with the weather green screen and sitting in the anchor's chair.
Cool thought exercise, Ty. I definitely agree with the suggestions to eliminate or otherwise compress the oceans.
Here's another suggestion for optimization: you don't need the same accuracy in wide-open spaces that you do in dense, urban ones. While it might be useful to locate someone within a meter in New York, Toyko, or Beijing, there are vast areas of the globe, including the oceans, Saskatchewan, the Arctic circles, Mongolia/Siberia, to name a few, where you don't need that level of precision. A square kilometer (one millionth the precision) or even 10 square kilometers (one ten-millionth) might be sufficient. Maybe there's a way to model a grid that is denser in populated areas than in unpopulated ones? This may make the translation to GPS a bit more complicated but might save you quite a bit of information storage.
Signal processing and data compression is fun and fascinating stuff - I have a BBN/Harvard/MIT friend who does this for a living -- I'll ask her to take a look at this article.
* By the way, the link took me to Saskatchewan too.
I could be missing the point here, but I just used http://is.gd to compress my location as grabbed from Google Maps and am getting very, very tiny URLs, even shorter than tofind.me does. As an exercise in "how would I do this" it is an interesting project, but for the end-user point of view, being able to make a url that is readable over the phone (or turned into a tiny QR code for a business card?), I wonder a bit if this isn't a solution in search of a problem.
Your website, encoding San Francisco, CA
URL shortening of standard Google Map URL, exact same address
But, in the spirit of thinking about the problem, I think if we look at the characters as raw strings of bits, we'll find we can encode quite a lot for a table look up in a database using just a few characters. A pre-built table could likely contain even shorter URLs, as we are concerned with only one domain of data: geo coordinates.
However, even just thinking about a one-for-one encoding of latitude and longitude, if we consider that 4 bits can hold the entire 10 digit space (plus extra... perhaps that space could be used for something), we can imagine that a single UTF-16 character could hold a 4 digit number, more than enough for a latitude plus .1 precision. Add a second character and with 32 bits we can encode xxx.xxxxx precision in two characters. Do that for both lat and longitude and we get 4 characters encoding any point on the globe with 5 decimal point precision. Add one more character and allow the lat and long to share some bit space within a single character and you'll gain 7 decimal precision.
With UTF-8 encoding, we have to be more sly in thinking about how best to maximize the bit usage. Still though, a single 8-bit ASCII character would effectively hold two digits of information, so if Wolfram Alpha gave you a base 62 digit that was 9 digits long and each digit can be represented by 4 bits, then at 5 characters we still have the possibility to encode every square meter on the planet. Going back to the UTF-16 character set, we could get it down to three characters... two if we are willing to lose precision... but there's still no guarantee those characters would be human readable.
Im not sure if you made some changes recently or not but the links to map locations you have there are somewhere in northern Canada. Also, when I try and go directly to the website without a /something at the end, nothing loads but a grey box and a green box. However, when I follow your link everything loads just fine.
Interesting solution to common problem. This is a problem that my friend and I set out to solve also. We took a somewhat different approach and enabled real-time tracking of friends also using google maps api. Check it out at mobileply.com. This is a little more robust and has some of the features I think you were looking to implement. I do love the simplicity of your idea though.
Cool idea! I just tried it and +remkjuka, it tell me is closest to Bylot Island, Baffin, Unorganized, NU, Canada.
And no map is showing. Tried it both in Chrome and Firefox on Ubuntu 10.
Saw this a few days ago and thought it was cool.
Was just browsing the internet and saw the following links:
The first one is more of a call for help (get in touch?!). Georef seems to be very similar to your proposal!
Angela - I missed it too at first, but it's in the fact that the URL is shortened to a point where you can easily communicate it.
Pretty awesome idea. Like the first commenter said though, the problem is getting people to ultimately adopt GPS. Till then, the nearest address is a nice workaround, if it is in fact accurate for the most part - it would be helpful to list the distance of the nearest address to your exact GPS coordinates, by measuring the distance between the two GPS coordinates
So, I'm in Japan right now. I stayed up all night packing, laundering, and cleaning the kitchen so that it would be pleasant when I got back. Jonah and Evan hung out with me to keep me awake. The best part was that I miscalculated the time and had to race to the bus station at top speed on my electric skateboard with my suitcase on my back. Luckily it's the best suitcase ever, so that was doable.
Todd and I made no plans prior to our day of departure. No hotel. No tours. Nothing. We didn't really even read about Japan. Early that morning, though, I scrambled and wrote some posts to craigslist looking for a place to stay. One guy responded, offering a very cheap room with bunk beds near Tokyo. With no better alternatives, we agreed.
Our flight went without incident. I spent it learning Mega Memory, watching Survivor Season 3, and sleeping just enough to get adjusted to Japanese time. Todd took a video of me sleeping, snoring, and tossing my head left and right as I tried to stay situated on the tiny little headrest.
INTERNAL SCORECARD #7
This is the seventh internal scorecard I've posted. I put these up as a way for you to see what production and productivity actually look like (with the up's and down's, and so on), and as a measure for myself of what's happening and what's to come.
This covers 30 June to 6 July.
DALIO OF THE WEEK
"Goals are the things that you really want to achieve, while desires are things you want that can prevent you from reaching your goals—as I previously explained, desires are typically first-order consequences. For example, a goal might be physical fitness, while a desire is the urge to eat good-tasting, unhealthy food (i.e., a first-order consequence) that could undermine you obtaining your fitness goal. So, in terms of the consequences they produce, goals are good and desires are bad." -- Ray Dalio, Principles, p27