Feature proposal: circleToCells
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
r1required to contain the circle - the maximum distance
r2guaranteed 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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