Re: geographic search engine

From: Date: Wed, 12 Jan 2005 22:29:08 +0000
Subject: Re: geographic search engine
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-206249@lists.php.net to get a copy of this message
I realized one day that at a distance of a hundred miles or less, I just didn't *CARE* about curvature of the earth, and replaced that trig with your basic Cartesian distance.
True, but be aware that this is only true when all of your coordinates are in the same general latitude. For example, lines of longitude are much closer together in Montana than they are in Texas.
If tomorrow the USPS creates zip code 60609, I can be pretty damn sure it's "close enough" to 60601 through 60608 and just average them to make up bogus long/lat. Sure, it's "wrong". It's also FREE and "close enough" for what I (and almost for sure you) are doing.
As the purveyor of a zip code database, I can assure you that this is not at all true. In many cases it is, but in many cases, not. Example: Here in So Cal we have 8 new zip codes since last month where the nearest zip code numerically is over 25 miles away. But I hear what you're saying as far as "good enough" for this particular application. - Brian

« previous php.general (#206249) next »