Re: [PHP] Re: Google Maps Distance Between UK Postcodes

2008-09-12 Thread tedd
At 8:31 AM -0700 9/11/08, mike wrote: On Thu, Sep 11, 2008 at 8:17 AM, tedd <[EMAIL PROTECTED]> wrote: Considering that my other profession is Geophysicist, I'm kind of up on those sort of things. The Earth is an oblate spheroid and the computation to include the curvature of the earth would

RE: [PHP] Re: Google Maps Distance Between UK Postcodes

2008-09-12 Thread tedd
At 3:54 PM -0500 9/11/08, Boyd, Todd M. wrote: > Considering that my other profession is Geophysicist, I'm kind of up on those sort of things. The Earth is an oblate spheroid and the computation to include the curvature of the earth would be a bit more involved. ---8<--- snip But it's als

RE: [PHP] Re: Google Maps Distance Between UK Postcodes

2008-09-12 Thread Boyd, Todd M.
> -Original Message- > From: news [mailto:[EMAIL PROTECTED] On Behalf Of Colin Guthrie > Sent: Friday, September 12, 2008 3:15 AM > To: php-general@lists.php.net > Subject: [PHP] Re: Google Maps Distance Between UK Postcodes > > Boyd, Todd M. wrote: > >> -Original Message- > >> Fro

RE: [PHP] Re: Google Maps Distance Between UK Postcodes

2008-09-11 Thread Boyd, Todd M.
> -Original Message- > From: tedd [mailto:[EMAIL PROTECTED] > Sent: Thursday, September 11, 2008 10:17 AM > To: php-general@lists.php.net > Subject: [PHP] Re: Google Maps Distance Between UK Postcodes > > At 5:37 PM +0100 9/1/08, Colin Guthrie wrote: > >Tom Chubb wrote: > >>That's all way

Re: [PHP] Re: Google Maps Distance Between UK Postcodes

2008-09-11 Thread Nathan Rixham
tedd wrote: At 5:37 PM +0100 9/1/08, Colin Guthrie wrote: Tom Chubb wrote: That's all way above my head, but I think I'll be able to understand it after a strong coffee! I should point out that this is really just trig and is only an approximate distance as the crow flies. Not even sure if i

Re: [PHP] Re: Google Maps Distance Between UK Postcodes

2008-09-11 Thread mike
On Thu, Sep 11, 2008 at 8:17 AM, tedd <[EMAIL PROTECTED]> wrote: > Considering that my other profession is Geophysicist, I'm kind of up on > those sort of things. The Earth is an oblate spheroid and the computation to > include the curvature of the earth would be a bit more involved. what do you

Re: [PHP] Re: Google Maps Distance Between UK Postcodes

2008-09-11 Thread Jason Pruim
On Sep 11, 2008, at 11:19 AM, tedd wrote: At 5:37 PM +0100 9/1/08, Colin Guthrie wrote: Tom Chubb wrote: That's all way above my head, but I think I'll be able to understand it after a strong coffee! I should point out that this is really just trig and is only an approximate distance as

Re: [PHP] Re: Google Maps Distance Between UK Postcodes

2008-09-01 Thread Tom Chubb
On 01/09/2008, Michal Sokolowski <[EMAIL PROTECTED]> wrote: > > > > 2008/9/1 Tom Chubb <[EMAIL PROTECTED]> > >> On 01/09/2008, Colin Guthrie <[EMAIL PROTECTED]> wrote: >> > >> > Tom Chubb wrote: >> > >> >> I thought it would be easy but it seems that I need to convert each >> >> postcode >> >> to

Re: [PHP] Re: Google Maps Distance Between UK Postcodes

2008-09-01 Thread mike
This is what I have: $distance = number_format(ceil(69*rad2deg(acos(sin(deg2rad($ulat)) * sin(deg2rad($vlat)) + cos(deg2rad($ulat)) * cos(deg2rad($vlat)) * cos(deg2rad($ulong - $vlong)); where: $ulat = latitude of user #1 $ulong = longitude of user #1 $vlat = latitude of user #2 $vlong = lo

Re: [PHP] Re: Google Maps Distance Between UK Postcodes

2008-09-01 Thread Michal Sokolowski
2008/9/1 Tom Chubb <[EMAIL PROTECTED]> > On 01/09/2008, Colin Guthrie <[EMAIL PROTECTED]> wrote: > > > > Tom Chubb wrote: > > > >> I thought it would be easy but it seems that I need to convert each > >> postcode > >> to Lat/Long using Geocoding and then work it out from there. > >> > > > > That's

Re: [PHP] Re: Google Maps Distance Between UK Postcodes

2008-09-01 Thread Tom Chubb
On 01/09/2008, Colin Guthrie <[EMAIL PROTECTED]> wrote: > > Tom Chubb wrote: > >> I thought it would be easy but it seems that I need to convert each >> postcode >> to Lat/Long using Geocoding and then work it out from there. >> > > That's the best way: then just do something like: > > Here's how I