geo_intro
GEO Introduction
Apply for Redis Developer Course
|
Redis Regular Inspection / Technical Support
|
Redis Enterprise Server
|
|---|
Introduction
GEO
Geo is a feature introduced in Redis version 3.2.
You enter longitude (vertical line) and latitude (horizontal line) of two points/cities
and compute the distance between them.
Redis Geo assumes the Earth is a perfect sphere.
Therefore an error of about 0.5% can occur in the worst case.
Geo uses the Sorted Set data structure. So some commands can be used as Sorted Set commands.
Range query: ZRANGE key 0 -1, delete: ZREM key member, count: ZCARD key
Command summary
| Commands | Version | Syntax | Description |
|---|---|---|---|
| GEOADD | 3.2.0 | key longitude latitude member [longitude latitude member ...] | |
| GEOPOS | 3.2.0 | key member [member ...] | |
| GEODIST | 3.2.0 | key member1 member2 [unit] | |
| GEORADIUSBYMEMBER | 3.2.0 | key member radius m|km|ft|mi [WITHCOORD] [WITHDIST] [WITHHASH] [COUNT count] [ASC|DESC] [STORE key] [STOREDIST key] | |
| GEORADIUS | 3.2.0 | key longitude latitude radius m|km|ft|mi [WITHCOORD] [WITHDIST] [WITHHASH] [COUNT count] [ASC|DESC] [STORE key] [STOREDIST key] | |
| GEOHASH | 3.2.0 | key member [member ...] |
Total : 6
| << PFMERGE | GEOADD >> |
|---|
Email
답글이 올라오면 이메일로 알려드리겠습니다.
