News for hackers. Stuff that matters.
Re:NASA Data Shows Toxic Air Threat Choking Indian Subcontinent by Retric on Thursday July 07, 2016 @05:05PM (#12052066)
There are not that many city's in any given country so N^2 is probably not a big deal. However, you can get approximate results by drawing a line at every angle through a country and then moving that line up and down. Then just look for city's near any good candidate lines.
Re:NASA Data Shows Toxic Air Threat Choking Indian Subcontinent by dxbydt on Thursday July 07, 2016 @05:18PM (#12052149)
> drawing a line at every angle through a country and then moving that line up and down.

This part is quite messy. For every given (c1,c2) city pair, you'd get 1 straight line that connects c1 to c2. Then for every city ck, you need info on whether ck is above that line or below - you can compute that by point-slope geometry with the lat-long coordinates ( given point p(x,y) & line l with some slope, is p above l or below ).

If you want to poke around, the dataset is here: http://seer.cancer.gov/popdata/