APNIC2, ARIN3 and RIPE4 are responsible for, amongst other things, allocating IP addresses to network providers and the like. If assumptions are made about the location of different providers then it is possible to construct a loose map of the Internet with some creative use of the whois command and trawling of online documents provided by these organisations. This map may be used as a heuristic to determine which POP is closest to a given client.
While simple, this method has many drawbacks. Constucting such a map is only pratcical if POPs are on very distinct networks. Another problem is that static maps are not adaptive to network changes and failures. It is also true to say that such a map may not accurately reflect network topology -- geographic locality is no gaurantee of netowrk-wise closeness. Furthermore, to reduce the complexity and size of the map it may be neccessary to make generalisations about networks by aggregating small allocations into one larger allocation -- this may reduce the accuracy of the map.
It may be possible to suplement the map by inspecting the hostname. For instance, while a .com may be located anywhere, it is reasonable to assume that a .au is located in Australia. However, doing a reverse lookup on the IP addresses of connecting clients may create a significant performance problem.
Though the approach of manually mapping the Internet is somewhat cumbersome it is simple once set up. No special information or services are required from upstream providers. And the map is static, so lookups should be fast. The map aproach certainly has its merits, but a more dynamic and automated mechanism would be a significant improvement.