0

In the database we have multiple latitude and longitude in 10 meter circle. So I need a query which will fetch only one latitude and longitude in every 10 meter radius.

I am expecting to get only one co-ordinate in every 10 meter circle. If multiple co-ordinates will be there in the database then query will only return one latest co-ordinate for every 10 meter radius.

IvanSanchez
  • 18,272
  • 3
  • 30
  • 45
  • 2
    I think it would be easier for people to help you if you describe better what your data looks like and what you've attempted so far – Sandil Ranasinghe Nov 16 '22 at 05:35
  • 1
    See [Tips for asking a good Structured Query Language (SQL) question](//meta.stackoverflow.com/questions/271055) – Akina Nov 16 '22 at 06:06
  • Create a 20-meter-wide bounding box around your point. Use `MBR_Contains` in the `WHERE` clause. Then `ORDER_BY` `ST_Distance`, and `LIMIT 1`. Do read the MySQL manual on the aforementioned functions. – IvanSanchez Nov 16 '22 at 08:25

0 Answers0