GEORADIUS_RO(3valkey)
π GEORADIUS_RO β bestie's guide to the read-only geo radius π
okay so real talk, this is the valkey command manual for GEORADIUS_RO, and if you're here you're probably trying to find everybody hanging out near a spot on the map without accidentally changing anything. iconic behavior, honestly.
β¨ NAME β¨
georadius_ro β hands you back all the members in a geospatial index that live within a certain distance of a coordinate. that's it, that's the whole job. π
πΈ SYNOPSIS πΈ
GEORADIUS_RO key longitude latitude radius <M | KM | FT | MI>
[WITHCOORD] [WITHDIST] [WITHHASH] [COUNT count [ANY]] [ASC | DESC]
so you're passing a key, a longitude, a latitude, a radius, and the radius has to be tagged with one of these units: M, KM, FT, or MI. then a lil pile of optional extras in brackets. the brackets mean optional bestie, don't type the brackets, i'm begging π
π¦ DESCRIPTION π¦
it's the read-only variant of the GEORADIUS command. like, the same energy, but it pinky-promises not to write anything.
it's identical to GEORADIUS in every way EXCEPT it does not support the optional STORE and STOREDIST parameters. no storing, no saving, no side quests. purely a vibe check on your geo data. β¨
π Alternative
GEOSEARCH with the BYRADIUS argument. if you're feeling modern, that's the glow-up version. π
π REPLY π
so here's what you get back, and it depends on what you asked for:
- if you specified no
WITH*option at all, you get a valkey-protocol(7) Array reply of matched member names. just names. clean, simple, no notes. π - if you did specify
WITHCOORD,WITHDIST, orWITHHASH, the command returns a valkey-protocol(7) Array reply of arrays, where each sub-array is one single item. and each of those sub-arrays contains:- the distance from the center as a floating point number, expressed in the same unit you specified in the radius. yes, same unit. keep track of your units bestie, i'm serious π
- the Geohash integer.
- the coordinates as a two-item
x,yarray, which is(longitude,latitude). longitude first. always longitude first. do not fight me on this. β
π COMPLEXITY π
O(N+log(M))
where:
Nis the number of elements inside the bounding box of the circular area delimited by center and radiusMis the number of items inside the index
translation: the more stuff in your box, the more work it does. not a huge deal but like, know it. π₯
π ACL CATEGORIES π
@geo @read @slow
(read-only, geo-flavored, and yeah, it's tagged slow. we respect the honesty.)
π§ HISTORY π§
- Available since:
3.2.10 - Changed in
6.2.0: Added theANYoption forCOUNT. - Changed in
7.0.0: Added support for uppercase unit names.
look at her growing up π₯Ή
π«Ά SEE ALSO π«Ά
geoadd(3valkey)geodist(3valkey)geohash(3valkey)geopos(3valkey)georadius(3valkey)georadiusbymember(3valkey)georadiusbymember_ro(3valkey)geosearch(3valkey)geosearchstore(3valkey)
go read all of them, the whole friend group is lovely π
fr fr remember:GEORADIUS_ROwill never store anything for you. if you wantedSTOREorSTOREDIST, you're in the wrong manpage and you need to go findGEORADIUS. no cap. π
and that's the whole thing! this page is from the valkey 9.0.0 command manual, dated 2025-10-21. go forth and query your geospatial index, you absolute icon π β¨π¦
π¦ where this page comes from
- fedora 44: valkey-doc 9.0.3-2.fc44 Β· CC-BY-SA-4.0
- fedora 44: valkey-doc 9.0.6-1.fc44 Β· CC-BY-SA-4.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms