-
Notifications
You must be signed in to change notification settings - Fork 539
feat: Implement gridRing #1011
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Implement gridRing #1011
Conversation
|
Not quite sure why were getting these errors when the test file has: also my first time writing in C so any help is appreciated! |
The issue is because the declaration needs to be added to |
|
Thanks for this contribution! I will take a look in more detail. If you're comfortable, could you also add this function to |
Ah I didn't notice that
Would prefer if someone could help me do that in a followup, thank you :) |
This commit introduces a new public API function,
gridRing, toretrieve H3 cells located at an exact grid distance
kfrom an origincell, forming a "hollow" ring.
The implementation mirrors implementation of
gridDiskDistanceswherein we first attempt to use the unsafe version. If the unsafe
version fails, we fallback to
_gridRingInternal._gridRingInternalutilizes_gridDiskDistancesInternalto get allcells up to distance
k, then filters the output to only include thoseat exactly
k.