diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2020-03-21 10:28:17 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-02-07 11:16:53 +0000 |
commit | 06cba6ccd165ca8b224797e37fccb9e63f026d77 (patch) | |
tree | e82f1bc439997ae296f2e74f8a64d84c5d95f140 /iredis/data/commands/geodist.md | |
parent | Initial commit. (diff) | |
download | iredis-06cba6ccd165ca8b224797e37fccb9e63f026d77.tar.xz iredis-06cba6ccd165ca8b224797e37fccb9e63f026d77.zip |
Adding upstream version 1.9.1.upstream/1.9.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'iredis/data/commands/geodist.md')
-rw-r--r-- | iredis/data/commands/geodist.md | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/iredis/data/commands/geodist.md b/iredis/data/commands/geodist.md new file mode 100644 index 0000000..3f32a89 --- /dev/null +++ b/iredis/data/commands/geodist.md @@ -0,0 +1,35 @@ +Return the distance between two members in the geospatial index represented by +the sorted set. + +Given a sorted set representing a geospatial index, populated using the `GEOADD` +command, the command returns the distance between the two specified members in +the specified unit. + +If one or both the members are missing, the command returns NULL. + +The unit must be one of the following, and defaults to meters: + +- **m** for meters. +- **km** for kilometers. +- **mi** for miles. +- **ft** for feet. + +The distance is computed assuming that the Earth is a perfect sphere, so errors +up to 0.5% are possible in edge cases. + +@return + +@bulk-string-reply, specifically: + +The command returns the distance as a double (represented as a string) in the +specified unit, or NULL if one or both the elements are missing. + +@examples + +```cli +GEOADD Sicily 13.361389 38.115556 "Palermo" 15.087269 37.502669 "Catania" +GEODIST Sicily Palermo Catania +GEODIST Sicily Palermo Catania km +GEODIST Sicily Palermo Catania mi +GEODIST Sicily Foo Bar +``` |