I need to store a group of coordinates in a database. I also need to query the database, given a coordinate that may or not be in the database, and get a list of coordinates within a certain proximity.
What's the best way to go about doing this? I've heard that the world map can be broken into hexagons, with each coordinate assigned to a hexagon, but I don't need to store the entire world map at this point (also what if two points are close to each other but in different hexagons?)
The app is similar to a food delivery app, so accuracy within a couple miles is important.