The Google and Yahoo Geocoders Compared

The Google and Yahoo geocoders can be used to obtain latitude and longitude information for millions of cities, towns and other places worldwide. The Geographic Midpoint Calculator uses the Google geocoder service as a primary source of lat/long data and the Yahoo geocoder service is used as a backup source.

When you type in the name of your city, town or other place (called search query) into the Geographic Midpoint Calculator's Search for place box and click Find it, your search query is first sent to Google. Google is searched first because it sends back more information in its search results than Yahoo does, for example the name of the state or zipcode, and that extra information can help you verify that you have found the right place. For example, if you search for Sydney, Australia, Google will send back the following search results:Sydney, NSW, Australia, where NSW stands for New South Wales. Google always sends back its search results nicely formatted with proper capitalization.

If Google can't find any information in its database that matches your search query, or if the Google server is busy and doesn't respond, then your search query is sent to Yahoo. Yahoo examines your search query and looks for the best possible match in its database. If Yahoo finds a match, your search query will be displayed in the search results exactly as you typed it. If you type your search query all in lower case, and then the search results come back to you all in lower case you know it came from Yahoo. Both Google and Yahoo use fuzzy logic to try to account for variations in the spelling or the misspelling of place names.

It is common to find more than one town with the same name in the same country, especially in the US and in some European countries. If you search for a city or town name without specifying a country or state, Google will send back a list of up to ten towns that match that name for you to choose from, while Yahoo only sends back one place in its search results. Fore example, if you type in Mapleton as your search query, Google will find 8 towns matching that name in the US. Similarly, if you search for Limbach, Google will find nine towns in Germany with that name.

You can search for individual street addresses in the US and Canada and a few other countries as well; Google periodically adds new information for different countries to its database. For example, you can type the following address as your search query:
1600 Pennsylvania Ave, Washington, DC and Google will find the exact coordinates for that address.

Most of the time the geocoder services send back the search results quickly (usually in less than one second). However, now and then you may have to wait up to three seconds for the search results to appear.

It's fun to search the geocoder by city, town or zip code to see what matching search results will be found, but when you really want to increase the probability of finding the right place, you should include the state or country name in your search query. It's also a good idea to see the locations found by the geocoder on a map to ensure that the locations are where you expect them to be.

About the technology

In both the Google and Yahoo services, the data is retrieved quickly in the background without having to go to another web page. This is in keeping with the Web 2.0 standard, and you will see it becoming more common in the future on the Internet.

Geographic Midpoint Calculator

See how the geocoder search works in a real online application. The Geographic Midpoint Calculator allows you to find the geographic midpoint for two or more places. You can find the midpoint of an airline flight between two cities. You can select all of the places that you have lived in, then all of your places will be displayed on a map along with a marker pointing at the exact midpoint for those places.

Google geocoding services