uber / uber/h3

Feature proposal: circleToCells

Open
#489 2 comments 3 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

This SO question, and others where people asked for a radius lookup, made me think that there might be value in a circle-fill function that produced more accurate "cells in radius" output than kRing. One option here, which could make this fairly fast, is to calculate:

  • the minimum grid radius r1 required to contain the circle
  • the maximum distance r2 guaranteed to be in the circle

Then you could use kRingDistances(cell, r1) and check only cells with a grid distance greater than r2 using a true geo distance calculation to determine whether they should be in the output set.

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 reading the existing kRingDistances behavior and the linked Stack Overflow example. Define the circle-fill function's inputs, output, distance handling, and accuracy expectations before assessing the proposed r1/r2 approach. Done means the requested API and its radius results are specified and validated against the intended circle boundaries.

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
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.