redict/deps/geohash-int
antirez 55c4a365d7 Geo: Fix geohashEstimateStepsByRadius() step underestimation.
The returned step was in some case not enough towards normal
coordinates (for example when our search position was was already near the
margin of the central area, and we had to match, using the east or west
neighbor, a very far point). Example:

    geoadd points 67.575457940146066 -62.001317572780565 far
    geoadd points 66.685439060295664 -58.925040587282297 center
    georadius points 66.685439060295664 -58.925040587282297 200 km

In the above case the code failed to find a match (happens at smaller
latitudes too) even if far and center are at less than 200km.

Another fix introduced by this commit is a progressively larger area
towards the poles, since meridians are a lot less far away, so we need
to compensate for this.

The current implementation works comparably to the Tcl brute-force
stress tester implemented in the fuzzy test in the geo.tcl unit for
latitudes between -70 and 70, and is pretty accurate over +/-80 too,
with sporadic false negatives.

A more mathematically clean implementation is possible by computing the
meridian distance at the specified latitude and computing the step
according to it.
2015-06-24 10:42:16 +02:00
..
geohash_helper.c Geo: Fix geohashEstimateStepsByRadius() step underestimation. 2015-06-24 10:42:16 +02:00
geohash_helper.h Geo: Fix geohashEstimateStepsByRadius() step underestimation. 2015-06-24 10:42:16 +02:00
geohash.c Geo: big refactoring of geo.c, zset.[ch] removed. 2015-06-23 08:42:57 +02:00
geohash.h Geo: removed useless functions, Marcatore coordinates, bool usage 2015-06-22 11:16:15 +02:00
Makefile [In-Progress] Add Geo Commands 2015-06-22 09:07:13 +02:00