Oct
30
2008
4

Finding geographical distances between two points in MySQL 5

For a project I’m working on I needed to find the distances between two points to be able to let users ask the application questions like: “How many points of type X (coworkers, jobs, gas stations, donutshops) are within a radius of point y (my home, my office, my previous donut shop). Or what is the nearest point x from point y.

I solved this problem with a stored procedure. Below the click are two stored procedures that achieve the same goal.

(more…)

Written by admin in: code | Tags: , , , ,

Powered by WordPress | Aeros Theme | TheBuckmaker.com WordPress Themes