Closed eblade closed 8 months ago
@eblade tnx for the contribution... none of us is in place these days due to holidays, we'll do a review next week I suppose.
Thanks @Jesus89 !
Sounds great! It was not my intention to make that package file part of the pull request, just wanted to build a personal package to use meanwhile and did not realize it was applied to the PR.
I've updated python versions in ci: https://github.com/CartoDB/quadbin-py/pull/15
Patch version released: https://pypi.org/project/quadbin/0.2.1
Thanks for your contribution!
The current implementation of cell_to_parent has a small bug in, easiest demonstrated by this example:
Note that the produced parent cell, while giving the correct tile, when turned into a cell again, does not have the same cell number, which would be expected.
The function in question:
The bug is the last line, where
parent_resolution
should only be shifted once. This can be seen in your js implementation for instance (though here it is*2
instead of<<1
):Also your SQL does it this way:
This changes allows for the reversibility of the cell.
I also fixed the test and created an additional one for this specific purpose.
Thanks! // Johan