uber / uber/h3

Unexpected zero J-coordinate in local ijk+ when resolution > 0

Open
#1,003 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
6.5k
Forks
627
Avg merge
3d 21h
Merged PRs (30d)
6

Description

Hi! I’m using H3 to assign local ijk+ coordinates to cells around a given origin.
At resolution 0, the six direct neighbors of the origin 0x8075FFFFFFFFFFF are:

(1, 0, 1)
(1, 0, 0)
(0, 1, 0)
(0, 1, 1)
(1, 1, 0)

However, when increasing resolution, for example to 2 (origin 0x82754FFFFFFFFFF), the output is:

(3, 0, 2)
(2, 0, 2)
(2, 0, 3)
(3, 0, 4)
(4, 0, 4)
(4, 0, 3)

I expected (acording to the image bellow) some of the neighbors to have a non-zero j component, but it’s always zero.

Image

(I'm using H3 version: v4.2.1)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the local ijk+ coordinate results described for H3 v4.2.1 at resolutions 0 and 2, using the origin and neighboring cells from the report. Trace the local ijk+ conversion entry point and compare its output with the expected coordinate interpretation shown in the linked image; done means the j component is correct for the affected neighbors.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
data
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.