Re: [PHP] Sorting users geographically...

2005-11-21 Thread David Grant
Hi Tony,

I would think the first step would be to find a web service or dataset
to convert a zip code to longitude/latitude.

The formula for calculating distances from long/lat is available here:

http://www.colorado.edu/geography/gcraft/warmup/aquifer/html/distance.html

Cheers,

David Grant

Tony Di Croce wrote:
 I'm helping a friend of mine build a matchmaking website, and we have a
 doozy of a problem to solve:
 
 What I need to do is two fold:
 
 #1 Collect whatever geographical information I need from each user to enable
 #2
 #2 Be able to run query's to find people NEAR (geographically) another
 person.
 
 Does anyone know of any commercial or free implementations of this? Is it
 primarily a database problem or is their some way (computationally) to
 compute the probable proximity of two zip codes?
 
 Hopefully someone responds to this with a Pear package that does exactly
 what I need! :) If that can't happen, then I'd appreciate any options you
 can think of.
 
 td
 
 --
 Free Linux Technical Articles
 http://www.linuxtecharticles.com
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Sorting users geographically...

2005-11-21 Thread Jim Moseby
 
 I'm helping a friend of mine build a matchmaking website, and 
 we have a
 doozy of a problem to solve:
 
 What I need to do is two fold:
 
 #1 Collect whatever geographical information I need from each 
 user to enable
 #2
 #2 Be able to run query's to find people NEAR (geographically) another
 person.
 
 Does anyone know of any commercial or free implementations of 
 this? Is it
 primarily a database problem or is their some way (computationally) to
 compute the probable proximity of two zip codes?
 
 Hopefully someone responds to this with a Pear package that 
 does exactly
 what I need! :) If that can't happen, then I'd appreciate any 
 options you
 can think of.
 

http://sniptools.com/latitudeLongitude.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Sorting users geographically...

2005-11-21 Thread Sandy Keathley
  Does anyone know of any commercial or free implementations of 
  this? Is it
  primarily a database problem or is their some way (computationally) to
  compute the probable proximity of two zip codes?


There is a class called zipLocator.  I think I found it at 
phpclasses.org.  It uses a large zipcode database, which can be 
downloaded for free (the address is in the class).

This will return all zipcodes within a specified distance from the 
target zipcode (10 mi, 50 mi, etc.).

If you can't find it, contact me offline.

Regards,

   SK


WebDesigns Internet Consulting
E-commerce Solutions
Application Development

Sandy Keathley
Zend Certified Engineer
[EMAIL PROTECTED]
972-569-8464

http://www.KeathleyWebs.com/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Sorting users geographically...

2005-11-21 Thread Marcus Bointon


On 21 Nov 2005, at 14:14, Tony Di Croce wrote:

Does anyone know of any commercial or free implementations of this?  
Is it

primarily a database problem or is their some way (computationally) to
compute the probable proximity of two zip codes?


All the suggested packages could be all you need, but also note that  
MySQL 5 has built-in GIS features which may make searches like these  
way more efficient should they use them:


http://dev.mysql.com/doc/refman/5.0/en/spatial-extensions-in-mysql.html
http://dev.mysql.com/doc/refman/5.0/en/functions-that-test-spatial- 
relationships-between-geometries.html


Marcus
--
Marcus Bointon
Synchromedia Limited: Putting you in the picture
[EMAIL PROTECTED] | http://www.synchromedia.co.uk

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php