summaryrefslogtreecommitdiffstats
path: root/iredis/data/commands/geopos.md
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2020-03-21 10:28:17 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-02-07 11:16:53 +0000
commit06cba6ccd165ca8b224797e37fccb9e63f026d77 (patch)
treee82f1bc439997ae296f2e74f8a64d84c5d95f140 /iredis/data/commands/geopos.md
parentInitial commit. (diff)
downloadiredis-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/geopos.md')
-rw-r--r--iredis/data/commands/geopos.md28
1 files changed, 28 insertions, 0 deletions
diff --git a/iredis/data/commands/geopos.md b/iredis/data/commands/geopos.md
new file mode 100644
index 0000000..14b941c
--- /dev/null
+++ b/iredis/data/commands/geopos.md
@@ -0,0 +1,28 @@
+Return the positions (longitude,latitude) of all the specified members of the
+geospatial index represented by the sorted set at _key_.
+
+Given a sorted set representing a geospatial index, populated using the `GEOADD`
+command, it is often useful to obtain back the coordinates of specified members.
+When the geospatial index is populated via `GEOADD` the coordinates are
+converted into a 52 bit geohash, so the coordinates returned may not be exactly
+the ones used in order to add the elements, but small errors may be introduced.
+
+The command can accept a variable number of arguments so it always returns an
+array of positions even when a single element is specified.
+
+@return
+
+@array-reply, specifically:
+
+The command returns an array where each element is a two elements array
+representing longitude and latitude (x,y) of each member name passed as argument
+to the command.
+
+Non existing elements are reported as NULL elements of the array.
+
+@examples
+
+```cli
+GEOADD Sicily 13.361389 38.115556 "Palermo" 15.087269 37.502669 "Catania"
+GEOPOS Sicily Palermo Catania NonExisting
+```