Re: geographic search engine

From: Date: Tue, 11 Jan 2005 20:39:03 +0000
Subject: Re: geographic search engine
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-206107@lists.php.net to get a copy of this message
On Tue, 11 Jan 2005 19:57:15 +0000, symbulos partners <partners@symbulos.com> wrote: > We would like to implement a geographic search engine. > > We have a list of places, the user enters a postcode + a radius in kms and > the search engine returns a list of places within a certain radius. So often php-general is graced with the presence of people with multiple personalities.. or are you really the borg? :) > Any body has any experience with anything similar? I coded a zip code to distance calculater last week. x = 69.1 * ( zip2.lat - zip1.lat ) y = 69.1 * ( zip2.lon - zip1.lon ) * cos( zip1.lat / 57.3 ) miles = sqrt( x^2 + y^2 ) This does not take into account the curve of the earth. In addition you'll need a db with the latitude and longitude for each zip code. -- Greg Donald Zend Certified Engineer http://destiney.com/

« previous php.general (#206107) next »