MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / membersOfGeoHashBox

Function membersOfGeoHashBox

src/geo.cpp:350–355  ·  view source on GitHub ↗

Obtain all members between the min/max of this geohash bounding box. * Populate a geoArray of GeoPoints by calling geoGetPointsInRange(). * Return the number of points added to the array. */

Source from the content-addressed store, hash-verified

348 * Populate a geoArray of GeoPoints by calling geoGetPointsInRange().
349 * Return the number of points added to the array. */
350int membersOfGeoHashBox(robj_roptr zobj, GeoHashBits hash, geoArray *ga, GeoShape *shape, unsigned long limit) {
351 GeoHashFix52Bits min, max;
352
353 scoresOfGeoHashBox(hash,&min,&max);
354 return geoGetPointsInRange(zobj, min, max, shape, ga, limit);
355}
356
357/* Search all eight neighbors + self geohash box */
358int membersOfAllNeighbors(robj_roptr zobj, GeoHashRadius n, GeoShape *shape, geoArray *ga, unsigned long limit) {

Callers 1

membersOfAllNeighborsFunction · 0.85

Calls 2

scoresOfGeoHashBoxFunction · 0.85
geoGetPointsInRangeFunction · 0.85

Tested by

no test coverage detected