-
Notifications
You must be signed in to change notification settings - Fork 522
Create cell from components #1037
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
base: master
Are you sure you want to change the base?
Conversation
Open questions:
|
cc: @zachasme |
This would definitely cover my use-case! 👍 |
src/h3lib/lib/h3Index.c
Outdated
// Optional: isValidCells is a more expensive test. do we want to run it | ||
// every time? | ||
// if (!isValidCell(h)) { | ||
// return E_CELL_INVALID; | ||
// } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My preference would be to allow users to specify invalid indexes if desired, as that could be used with getIndexDigit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you want to only generate valid cells, I think the only missing check is for the pentagon deleted subequence, so the full call to isValidCell might not be needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I like the idea of this function only returning valid cells. I've reworked the code towards that.
Update:
|
…sy on screen. this removes dots, but is kind of a messy test
Follow up from #1022: provides a function to create an H3 cell from (resolution, base cell number, and digit) components.
Relevant to #277