The reason this looks so unintimidating is because I deleted all the duplicate points and all the edges. If my algorithm was correct, then there were only 1022 unique points out of the 1.7 million. But this still took like 2 hours to calculate.