Archive for September, 2007

The Google Geocoder API

Google allows web developers to create “mashup” mapping applications using programming API’s that connect to Google’s mapping servers. One of the APIs is for geocoding – finding the location of a place based on its name. For example: when you want to see a map of “Turners Creek, MD” you first have to geocode the place name to its latitude and longitude coordinates (39.342013,-75.996743).

Fun with the Google Geocoder API

I was investigating how the geocoder returns information when an address lookup fails, so I typed in “la la land, MD” (MD = Maryland), expecting the geocoder to fail, but to my great surprise it returned an actual location near Front Royal, MD (you can try this at the Google geocoder api demo page or at any number of Google maps mashups). For my international readers, when an American says someone is in “la la land” she is suggesting that the person is not grounded in reality, e.g. living in a fantasy land. For the fantasy location “la la land, MD“, the Google API return results indicate that the accuracy is at the “country” level so I would have expected to get the centroid of the US (Google puts this somewhere near Portland Oregon, which makes sense if you include all 50 states). Nor is the location the centroid of the State of Maryland which, by a quirk of geography and history, is located in Fairfax, Virginia. This leads me to wonder whether someone actually put “la la land, MD” in the database. “la la land, NY” also has a “country” level accuracy. It is located near Muttontown, New York on Long Island, just off Brookville Rd. If you drive by, take a picture and I will post it here.

la-la-land-ny.png

Next I typed in “la la land, PA” and found that it actually returned a location with “street level” accuracy. Oops. Apologies to anyone who lives at “Farm Land Rd Way, Mifflinburg, PA 17844“! Surprisingly, the regular Google maps fails to geocode that location. It is possible that this could be a parsing error since “la land, pa” geocodes to an address of “Land Ln, Schnecksville, PA 18078, USA” and “la la land, CA” (California) is at “Garden Land Rd, Los Angeles, CA 90049“.

la-la-land-pa.png

Google Maps API Geocoder uses Tiger Data?

For US addresses, the Google geocoder API, which is free for no more than 50,000 geocodes per day, behaves differently than the one on maps.google.com. In fact, it behaves a lot like geocoder.us, which uses free US Census Bureau tiger data. The problem with tiger data is that is not nearly as complete or accurate as the NavTeq mapping data that all of the major mapping services use. Here’s an example: Use the address “210 south bank, Landenberg, PA” and enter it into to maps.google.com, geocoder.us and this demo page (uses the Google map geocoding API). You will see that maps.geoogle.com finds the correct location but both geocoder.us and the Google geocoder API fail. Now type in “1600 Amphitheatre Pky, Mountain View, CA” and you will see that geocoder.us and the Google API both succeed.

It makes sense for Google to use tiger data for their API partners. After all, accurate geocoding data costs money and the users of the geocoding API aren’t paying anything. And unlike map images, I can think of no obvious way to sell advertising for geocodes.

  • Share/Bookmark

google-kml-22-uml-diagram-thumb.png

Google provides great documentation for KML, but their diagram leaves much to the imagination. I looked around for a more complete diagram of KML 2.2 that I could use as a quick reference, but couldn’t find any so I made one myself. I did it using MyEclipse’s UML modeling tool, which has some irritating quirks, but for the most part is reliable. The diagram is Java-centric and doesn’t include every object, though most of the important stuff is there.

Click on the image to see the entire diagram.  Here’s the actual My Eclipse UML file. If you make any corrections or enhancements, please send me an update.

  • Share/Bookmark

After writing my essay about platform peril, I found this great video interview from Oct 2006 with Tim Bray, one of the inventors of XML and current Director of Web Technologies for Sun Microsystems (here’s his blog). The interview addresses software architecture and development frameworks, and deals with some of the same issues I raised in earlier my post. The topics include Ruby on Rails, Java, Groovy, REST, Web Services, SOAP, ATOM, Static vs Duck Typing:

  • He likes Ruby and Ruby on Rails, but thinks Java has performance and IDE advantages because of static typing.
  • He didn’t think (as of October 06) that groovy or grails was stable or had any community. I wonder if this has changed at all recently.
  • He likes the JRuby, Jython, etc.
  • He hates SOAP, likes REST or possibly other simpler technologies. Amazon offered APIs for soap and plain old xml. 90% use the plain old xml.
  • He thinks SOA is marketing fluff.
  • At one point in the conversation, he invoked Joel Spolsky’s term ‘architecture astronautics‘ to describe Web Services specifications (WS*). “… There’s a certain class of people who want to build big complicated systems from scratch, and it doesn’t work! It’s never worked! …
  • He thinks RSS is a mess and actively participates on the ATOM specification, which attempts to solve problems with the various RSS specifications. He has interesting things to say about the benefits of ATOM.
  • Share/Bookmark