Skip to content

Add Geo Commands - #1745

Closed
mattsta wants to merge 1 commit into
redis:unstablefrom
mattsta:geo-integrate
Closed

mattsta wants to merge 1 commit into
redis:unstablefrom
mattsta:geo-integrate

Conversation

@mattsta

@mattsta mattsta commented May 12, 2014

Copy link
Copy Markdown
Contributor

This commit integrates geo commands (https://matt.sh/redis-geo) into Redis.

The only major remaining issue I'm aware of is: we need to clean up my copy/pasted zset access functions in zset.{c,h} with a correct zset access API.

Once we get the zset interface fixed, we can squash
relevant commits in this branch and have one nice commit
to merge into unstable.

This commit adds:

  • Geo commands
  • Tests; runnable with: ./runtest --single unit/geo
  • Geo helpers in deps/geohash-int/
  • src/geo.{c,h} and src/geojson.{c,h} implementing geo commands
  • Updated build configurations to get everything working
  • TEMPORARY: src/zset.{c,h} implementing zset score and zset
    range reading without writing to client output buffers.
  • Modified linkage of one t_zset.c function for use in zset.c

Current todo:
  - replace functions in zset.{c,h} with a new unified Redis
    zset access API.

Once we get the zset interface fixed, we can squash
relevant commits in this branch and have one nice commit
to merge into unstable.

This commit adds:
  - Geo commands
  - Tests; runnable with: ./runtest --single unit/geo
  - Geo helpers in deps/geohash-int/
  - src/geo.{c,h} and src/geojson.{c,h} implementing geo commands
  - Updated build configurations to get everything working
  - TEMPORARY: src/zset.{c,h} implementing zset score and zset
    range reading without writing to client output buffers.
  - Modified linkage of one t_zset.c function for use in zset.c
@antirez

antirez commented Feb 25, 2015

Copy link
Copy Markdown
Contributor

Status: want merge, not enough refactoring of the zset internal functions... This should work like quicklists I guess to be a non-brainer, that is: the basic zset API should be tested much better than currently it is in a direct way (currently it is mostly tested in an indirect way), and later the refactoring effort should be done.

@antirez

antirez commented Jun 22, 2015

Copy link
Copy Markdown
Contributor

Update on this issue: I'm in the process of merging the code (minus the JSON part). Unfortunately the PR already failed in the GEORADIUSBYMEMBER test, so I'm investigating what the problem could be. More updates as there are news in this regard. I already converted a few more C++-isms (more like C99 features that we don't use, actually) to the Redis coding styles, so the main work I'm yet to perform is:

  1. Removing of the additional parts. I already removed Marcatore coordinate system which is not used, and many functions of the geo encoder which where not used.
  2. Refactoring of the sorted set API (does not look like terrible at a first glance).
  3. Fixing of GEORADIUSBYMEMBER (either the test or the code).

@antirez

antirez commented Jun 22, 2015

Copy link
Copy Markdown
Contributor

Ok Item "3" is sorted out: it's just the test failure that checks the output after the digit the precision is not going to be equal between different systems double->string conversion apparently. Only happens in the JSON output for digits which are non significant. That's good news.

@antirez

antirez commented Jul 17, 2015

Copy link
Copy Markdown
Contributor

Everything merged. Thanks.

@antirez antirez closed this Jul 17, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants