# GEOPOS

> Return the longitude and latitude of members of a geospatial index.

URL: https://docs.hotkv.com/commands/geopos/

```
GEOPOS key member [member ...]
```

- Group: Geospatial
- Complexity: O(1) per member
- HotKV Cloud: all plans
- On-Premise: no license needed

`GEOPOS` returns the stored position of each member as a longitude and a
latitude. Positions are stored with a precision of well under a meter, so the
values read back differ slightly from the ones given to
[GEOADD](https://docs.hotkv.com/commands/geoadd/index.md).

## Return value

| Case | RESP2 | RESP3 |
| --- | --- | --- |
| Member exists | Array `[longitude, latitude]` of bulk strings | Array `[longitude, latitude]` of doubles |
| Member or key missing | Nil array in its place | Null in its place |

`WRONGTYPE` if the key is not a sorted set.

## Examples

```
127.0.0.1:6379> GEOADD cities -0.1276 51.5072 london
(integer) 1
127.0.0.1:6379> GEOPOS cities london atlantis
1) 1) "-0.12760072946548462"
   2) "51.50720053692976"
2) (nil)
```

## Compatibility

Same as Redis 7 and Valkey 8.

## See also

[GEOADD](https://docs.hotkv.com/commands/geoadd/index.md), [GEODIST](https://docs.hotkv.com/commands/geodist/index.md), [GEOHASH](https://docs.hotkv.com/commands/geohash/index.md)