summaryrefslogtreecommitdiffstats
path: root/iredis/data/commands/geopos.md
blob: 14b941cd7f11b1db6d2f550e26beb833714688be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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
```