summaryrefslogtreecommitdiff
path: root/src/geohash_helper.h
Commit message (Collapse)AuthorAgeFilesLines
* Delete some unimplemented prototype. (#8882)Binbin2021-04-291-1/+0
| | | Remove forward declarations from header files to functions that do not exist.
* GEOSEARCH bybox bug fixes and new fuzzy tester (#8445)Yang Bodong2021-02-041-1/+1
| | | | | | | | | | | | | | Fix errors of GEOSEARCH bybox search due to: 1. projection of the box to a trapezoid (when the meter box is converted to long / lat it's no longer a box). 2. width and height mismatch Changes: - New GEOSEARCH point in rectangle algorithm - Fix GEOSEARCH bybox width and height mismatch bug - Add GEOSEARCH bybox testing to the existing "GEOADD + GEORANGE randomized test" - Add new fuzzy test to stress test the bybox corners and edges - Add some tests for edge cases of the bybox algorithm Co-authored-by: Oran Agra <oran@redislabs.com>
* Add GEOSEARCH / GEOSEARCHSTORE commands (#8094)杨博东2020-12-121-8/+4
| | | | | | | | | | | | | | | | | Add commands to query geospatial data with bounding box. Two new commands that replace the existing 4 GEORADIUS* commands. GEOSEARCH key [FROMMEMBER member] [FROMLOC long lat] [BYRADIUS radius unit] [BYBOX width height unit] [WITHCORD] [WITHDIST] [WITHASH] [COUNT count] [ASC|DESC] GEOSEARCHSTORE dest_key src_key [FROMMEMBER member] [FROMLOC long lat] [BYRADIUS radius unit] [BYBOX width height unit] [WITHCORD] [WITHDIST] [WITHASH] [COUNT count] [ASC|DESC] [STOREDIST] - Add two types of CIRCULAR_TYPE and RECTANGLE_TYPE to achieve different searches - Judge whether the point is within the rectangle, refer to: geohashGetDistanceIfInRectangle
* Fix definition of M_PI in geohash_helper.c.antirez2016-07-061-1/+0
| | | | Without the right feature macros M_PI is not defined in math.h.
* geohash.c and geohash_helper.c are part of Redis.antirez2016-07-061-0/+71
They were under /deps since they originate from a different source tree, however at this point they are very modified and we took ownership of both the files making changes, fixing bugs, so there is no upgrade path from the original code tree. Given that, better to move the code under /src with proper dependencies and with a more simpler editing experience.