Get all points with in some range of a point (or range of point) in MySQL

المشرف العام

Administrator
طاقم الإدارة
I have got a list of points and a fixed range (10m). So what I have to do is for each point I have to find all the points present in a table with the 10m range of the given point.

For example:Let say I have following list of points:
P1, P2, P3, P4, P5, P6

Now I have to loop through each point.First I'll get P1 and I need all points (in a table) present inside the circle where radius is 10m and center is P1.Similarly I'll do for all other points from P2 to P6. My result will be all the outcome points in each loop.

I am not sure whether I have explained well or not. But I can clarify if you can comment.

I also need to improve the solution; where I can calculate the outcome points one at time (by creating a polygon maybe) and then somehow consider the range.

Thanks



أكثر...
 
أعلى