A related feature that would be very interesting is to implement a
function that takes the set of (lat, long, city name) and a point
(lat, long), and find the nearest city to this point. I have looked at
kdtrees but do not know how I can use a kdtree with lat/long
coordinates. If someone can provide an algorithmic explanation I'd be
happy to come up with a first cut of the implementation.