Redis › Geospatial Data in Redis
How do you find all stored locations within a certain radius of a specific point using Redis?
IntermediateAnswer
You use the GEOSEARCH command, specifying a center point either by coordinates or by an existing member's name, along with a radius and unit, and Redis returns all members within that stored dataset that fall within the specified distance from the center point.
GEOSEARCH locations FROMMEMBER 'San Francisco' BYRADIUS 500 km ASCReal-world example A ride sharing application finds all available drivers within a five kilometer radius of a customer's pickup location using GEOSEARCH, quickly identifying the nearest available options.