CodeIgniter Forums
Geographic Distance Queries? - Printable Version

+- CodeIgniter Forums (
+-- Forum: Archived Discussions (
+--- Forum: Archived Development & Programming (
+--- Thread: Geographic Distance Queries? (/thread-8405.html)

Geographic Distance Queries? - El Forum - 05-16-2008

Hello All,

I have a places model with lat and long, and I'd like to be able to make simple geographic queries for related places, such as finding places within a mile of a given place.

Can anyone point me in the right direction of work that has been done in this area or libraries that might exist?

Thanks in advance to all for helping a noob. I'm new to CodeIgniter but not application development or frameworks. (I'm starting to get into CI for its PHP roots with ease of use and deployment)


Geographic Distance Queries? - El Forum - 05-16-2008

You might try looking at the file, it is a php class you might be able to drop right-in your CI applications/libraries folder and use.

Description: A simple class for finding distances between two zip codes, The distance calculation is based on Zipdy package found at written by V. Alex Brennen. You can also do radius calculations to find all the zipcodes within the radius of x miles.