Nerds at Northwestern came up with a really clever way to determine location based only on IP address to within a 1/2 mile:
http://arstechnica.com/tech-policy/news/2011/04/getting-warmer-an-ip-address-can-map-you-within-half-a-mile.arsTo summarize:
Step one: Ping the targeted address from multiple servers, then recording the amount of time that it takes a signal to return. (this is good for tracking within several miles)
Step two: A selection of points within the possible area are selected and a mapping service is used to guess at a variety of possible businesses, schools, and other institutions in the area. You are looking for locations that publish their street address on their website (websites of surrounding businesses are scraped) and also host their website from that same physical address.
Step three: Now you have a collection of pairs of IP and physical addresses, you can start searching for Internet backbone routers in the vicinity. Send traceroute requests from as many servers as possible to both the nearby landmarks and to the target IP address. By comparing these you can deduce which nearby routers are connected to both the target and the landmark. The time it takes these nearby routers to ping the target allows you to track down the area to just a few city blocks.