I want to create an algorithm that takes an array of grocery stores with their location (long and lat) and based on my current location calculates which store is closest to me.
Do you have any idea what is the most optimal way to create such an algorithm? Thank you in advance!
CodePudding user response:
This is the equivalent of finding the nearest point on an (x,y) plane from a list of points with a starting point and there are so many solutions.
The solution I suggest is already answered before and it is written on numpy
(a Python library)