From dd874ab02db04853d4b5952712ab34693f9a93de Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 4 Jan 2023 08:19:36 +0100 Subject: Merging upstream version 1.13.0. Signed-off-by: Daniel Baumann --- iredis/data/commands/geohash.md | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) (limited to 'iredis/data/commands/geohash.md') diff --git a/iredis/data/commands/geohash.md b/iredis/data/commands/geohash.md index f091912..a99ade2 100644 --- a/iredis/data/commands/geohash.md +++ b/iredis/data/commands/geohash.md @@ -1,28 +1,22 @@ -Return valid [Geohash](https://en.wikipedia.org/wiki/Geohash) strings -representing the position of one or more elements in a sorted set value -representing a geospatial index (where elements were added using `GEOADD`). +Return valid [Geohash](https://en.wikipedia.org/wiki/Geohash) strings representing the position of one or more elements in a sorted set value representing a geospatial index (where elements were added using `GEOADD`). Normally Redis represents positions of elements using a variation of the Geohash technique where positions are encoded using 52 bit integers. The encoding is also different compared to the standard because the initial min and max coordinates used during the encoding and decoding process are different. This command however **returns a standard Geohash** in the form of a string as -described in the [Wikipedia article](https://en.wikipedia.org/wiki/Geohash) and -compatible with the [geohash.org](http://geohash.org) web site. +described in the [Wikipedia article](https://en.wikipedia.org/wiki/Geohash) and compatible with the [geohash.org](http://geohash.org) web site. -## Geohash string properties +Geohash string properties +--- -The command returns 11 characters Geohash strings, so no precision is loss +The command returns 11 characters Geohash strings, so no precision is lost compared to the Redis internal 52 bit representation. The returned Geohashes have the following properties: -1. They can be shortened removing characters from the right. It will lose - precision but will still point to the same area. -2. It is possible to use them in `geohash.org` URLs such as - `http://geohash.org/`. This is an - [example of such URL](http://geohash.org/sqdtr74hyu0). -3. Strings with a similar prefix are nearby, but the contrary is not true, it is - possible that strings with different prefixes are nearby too. +1. They can be shortened removing characters from the right. It will lose precision but will still point to the same area. +2. It is possible to use them in `geohash.org` URLs such as `http://geohash.org/`. This is an [example of such URL](http://geohash.org/sqdtr74hyu0). +3. Strings with a similar prefix are nearby, but the contrary is not true, it is possible that strings with different prefixes are nearby too. @return -- cgit v1.2.3