[thelist] Zip Code Distance From

Jason Handby jason.handby at corestar.co.uk
Wed Mar 28 11:41:55 CDT 2007


> Ok, I'm scared:
> 
> ~~~~~~~~~~~~~~~~~~
> The right way to calculate distance is with spherical trig. 
> Take a look
> at this distance testing program for an example of 
> calculating distance
> in the three ways mentioned.
> 
> Assuming you have perl: perl disttest.pl lat1 long1 lat1 long2
> 
> [rich at testingrange geo]$ ./disttest.pl 45 0 55 10
> spherical trig distance: 819.41783616337
> cartesian distance: 975.807358037436
> cosine modified cartesian distance: 820.251821885442
> ~~~~~~~~~~~~~~~~~~
> 
> I'm starting to think that a nice 3rd party app that costs a 
> few $ might
> be a better option.


Hmmm, you're right. Ignore what I said about how to work this out; it's
trickier than I thought...

Sounds like it's time to brush up on your maths or start googling for a
3rd party solution :-)




Jason



More information about the thelist mailing list