4 ms·
> I have a feeling that's a bit more difficult than centers, though. This is quite an understatement.
by mypalmike 5y ago
> I have a feeling that's a bit more difficult than centers, though.
This is quite an understatement.
- 3np 5y agoGiven it's a static dataset of countries, the distance of all country pairs could all be precomputed and loaded in memory, I guess ¯\_(ツ)_/¯
- mypalmike 5y agoTrue. 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.