Usage
Parameters
The key containing the geospatial index.
The center point to search from:
The search area shape:
Sort order:
ASC- Sort by distance from center (nearest first)DESC- Sort by distance from center (farthest first)
Optional search options:
Response
An array of search results, each containing:
Examples
Search by radius from coordinates
Search from existing member
Include distance and coordinates
Limit results
Search by rectangular box
Sort by distance descending
Include all metadata
Important Notes
Performance Considerations
- Use
count.any: truefor better performance when you don’t need exact ordering of all results - Smaller search areas are faster than larger ones
- Consider using
BYBOXfor rectangular areas instead of very large radius searches
Coordinate Order
Note thatcenterPoint uses lon and lat (shortened forms) while the response coord uses long and lat:
Distance Units
| Unit | Abbreviation |
|---|---|
| Meters | M |
| Kilometers | KM |
| Feet | FT |
| Miles | MI |