7 Geo Commands
value
redis-latitude/c : (real-in -90 90)
value
redis-longitude/c : (real-in -180 180)
value
: (list/c redis-longitude/c redis-latitude/c redis-string/c)
value
redis-geo-unit/c : (or/c 'm 'km 'mi 'ft)
The geo-related contracts.
procedure
(redis-geo-add! client key geo ...+) → exact-nonnegative-integer?
client : redis? key : redis-key/c geo : redis-geo/c
Adds the geohashes of each geo to the geo hash set at
key and returns the number of new items that were added.
Commands used by this function: GEOADD
procedure
(redis-geo-dist client key member1 member2 [ #:unit unit]) → (or/c #f real?) client : redis? key : redis-key/c member1 : redis-string/c member2 : redis-string/c unit : (or/c #f redis-geo-unit/c) = #f
Returns the geo distance between member1 and
member2.
Commands used by this function: GEODIST
procedure
(redis-geo-hash client key mem ...+) → (listof (or/c #f bytes?))
client : redis? key : redis-key/c mem : redis-string/c
Returns the geohash of each mem.
Commands used by this function: GEOHASH
procedure
(redis-geo-pos client key mem ...+)
→ (listof (or/c #f (list/c redis-longitude/c redis-latitude/c))) client : redis? key : redis-key/c mem : redis-string/c
Returns the longitude and latitude of each mem.
Commands used by this function: GEOPOS