uber / uber/h3

Improvement to h3Line algorithm: Support any great arc

Open
#195 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Improved algo for h3Line that can cross arbitrary base cells with better fidelity than the current implementation:

  • Take the great arc between start and end
  • Subdivide the great arc by the icosahedron edges
  • Use the current implementation to draw lines for each line segment
  • Union the results

This should allow any arc >= 180 degrees, and ensure fidelity to the true great arc.

TODO: Prove that this is also the shortest grid distance (h3Distance).

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 at the h3Line entry point and trace the current line-drawing implementation. Compare its behavior with the proposed great-arc subdivision across icosahedron edges, then inspect h3Distance for the shortest-grid-distance question. Done means arbitrary arcs, including those at least 180 degrees, follow the true great arc with improved fidelity and the distance property is addressed.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
data
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.