GEODIST
Reports the distance between two stored locations in kilometers.
Geospatial · Example verified
Syntax covered here
GEODIST key member1 member2 kmThe verified calculation compares a member with itself and returns zero; a nonzero distance is not checked.
Tested example & replies
Requests below run in order against an empty database. Each connection authenticates with the fixture password first. Quoted values are strings; null is a nil reply; arrays preserve RESP order.
# connection: default
> GEOADD places 13.361389 38.115556 Palermo
1
# connection: default
> GEODIST places Palermo Palermo km
"0.0000"