Update: I notice that your perl code uses a flat-geometric distance rather than a curved-earth great circle distance. That's probably good enough for typical geometric queries (like "50 miles from my house"). But you could do the same thing in the C program. You could also search using the distance squared and avoid all those square roots.
my $xdelta = $x1-$x2; my $ydelta = $y1-$y2; my $distance_squared = $xdelta*$xdelta + $ydelta*$ydelta;
In reply to Re: Zipcode Proximity script
by tall_man
in thread Zipcode Proximity script
by hacker
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |