1. 04 May, 2016 1 commit
  2. 18 Feb, 2016 4 commits
  3. 07 Oct, 2015 1 commit
    • antirez's avatar
      Fix extractLongLatOrReply() sanity check conditionals. · f29e3848
      antirez authored
      the check for lat/long valid ranges were performed inside the for loop,
      two times instead of one, and the first time when the second element of
      the array, xy[1], was yet not populated. This resulted into issue #2799.
      
      Close issue #2799.
      f29e3848
  4. 06 Oct, 2015 1 commit
  5. 01 Oct, 2015 1 commit
  6. 14 Sep, 2015 1 commit
    • antirez's avatar
      GEORADIUS: Don't report duplicates when radius is huge. · 3c23b5ff
      antirez authored
      Georadius works by computing the center + neighbors squares covering all
      the area of the specified position and radius. Then a distance filter is
      used to remove elements which are actually outside the range.
      
      When a huge radius is used, like 5000 km or more, adjacent neighbors may
      collide and be the same, leading to the reporting of the same element
      multiple times. This only happens in the edge case of huge radius but is
      not ideal.
      
      A robust but slow solution would involve qsorting the range to remove
      all the duplicates. However since the collisions are only in adjacent
      boxes, for the way they are ordered in the code, it is much faster to
      just check if the current box is the same as the previous one processed.
      
      This commit adds a regression test for the bug.
      
      Fixes #2767.
      3c23b5ff
  7. 26 Jul, 2015 3 commits
  8. 09 Jul, 2015 2 commits
    • antirez's avatar
      GEOENCODE / GEODECODE commands removed. · b96af595
      antirez authored
      Rationale:
      
      1. The commands look like internals exposed without a real strong use
      case.
      2. Whatever there is an use case, the client would implement the
      commands client side instead of paying RTT just to use a simple to
      reimplement library.
      3. They add complexity to an otherwise quite straightforward API.
      
      So for now KILLED ;-)
      b96af595
    • antirez's avatar
      Geo: -Ofast breaks builds on older GCCs. · 1e127842
      antirez authored
      1e127842
  9. 06 Jul, 2015 1 commit
  10. 01 Jul, 2015 1 commit
  11. 29 Jun, 2015 12 commits
  12. 27 Jun, 2015 3 commits
  13. 26 Jun, 2015 1 commit
    • antirez's avatar
      Geo: from lat,lon API to lon,lat API according to GIS standard · fa9d62d3
      antirez authored
      The GIS standard and all the major DBs implementing GIS related
      functions take coordinates as x,y that is longitude,latitude.
      It was a bad start for Redis to do things differently, so even if this
      means that existing users of the Geo module will be required to change
      their code, Redis now conforms to the standard.
      
      Usually Redis is very backward compatible, but this is not an exception
      to this rule, since this is the first Geo implementation entering the
      official Redis source code. It is not wise to try to be backward
      compatible with code forks... :-)
      
      Close #2637.
      fa9d62d3
  14. 24 Jun, 2015 3 commits
    • antirez's avatar
      03ce1896
    • antirez's avatar
    • antirez's avatar
      Geo: Fix geohashEstimateStepsByRadius() step underestimation. · 55c4a365
      antirez authored
      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.
      55c4a365
  15. 23 Jun, 2015 5 commits