Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

True. But to perform that precomputation, you have to find a database of country geometry outlines. And (manually?) filter out things like Hawaii and Guam from these. Then, assuming country geometry is given as lat lon polygons, it seems you then are computing either O(n^2 * m^2) distances where n is the number of countries and m is the average number of vertices per country. Or you might come up with some space partitioning algorithm on the vertices to reduce that to maybe O(n^2 * m log(m)). It's doable, but my comment was merely pointing out that it's much more complex than comparing country centers.


Oh, good point. Getting an SVG of the world and just brute forcing every country would be near instant.


Hmm. What issue might you encounter trying to solve this problem using an SVG?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: