GEOSEARCH
GEOSEARCH key [FROMMEMBER member] [FROMLONLAT longitude latitude] [BYRADIUS radius m|km|ft|mi] [BYBOX width height m|km|ft|mi] [ASC|DESC] [COUNT count] [WITHCOORD] [WITHDIST] [WITHHASH]
#Example
redis> GEOADD Sicily 13.361389 38.115556 "Palermo" 15.087269 37.502669 "Catania" (integer) 2 redis> GEOADD Sicily 12.758489 38.788135 "edge1" 17.241510 38.788135 "edge2" (integer) 2 redis> GEOSEARCH Sicily FROMLONLAT 15 37 BYRADIUS 200 km ASC 1) "Catania" 2) "Palermo" redis> GEOSEARCH Sicily FROMLONLAT 15 37 BYBOX 400 400 km ASC 1) "Catania" 2) "Palermo" 3) "edge2" 4) "edge1"
Query a sorted set representing a geospatial index to fetch members inside an area of a box or a circle.
Comments