10.2. Geocoding

Geocoding is the process by which information is associated with particular geographic points in the world. These points are identified by degrees in latitude and longitude, which you may remember from grade school as the north-south and east-west measurements, respectively. It may surprise you to know that most mapping APIs don't actually know the location of addresses; they know the location of points given in latitude and longitude. All addresses must be converted to a set of points before being located on a map.

All of the mapping APIs require the use of degree decimals for both latitude and longitude. This is different from what you probably learned about in school, where latitude and longitude are identified by degrees, minutes, and seconds. If you have a location in this format, you'll need to use a converter to get the degree decimal values. And of course, if you have an address, you'll need to convert that to latitude and longitude into degree decimals as well.

10.2.1. Geocoding Web Sites

Most countries provided geocoded information about the terrain through census records. In the United States, for instance, the U.S. Census Bureau geocodes nearly every highway and surface street in the country. Further, this data is in the public domain and can be accessed via the Topologically Integrated Geographic Encoding and Referencing system (Tiger, www.census.gov/geo/www/tiger). Plowing through all of this information is an arduous process since there's more than ...

Get Professional Ajax, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.