I am using H3 spatial index implementaion h3o. I want to encode a local cell pattern to draw it around a given index.
The first problem is that I am inevitably going to fight pentagons, but I don't care about warping the pattern around them. So handling of pentagons is reduced to preventing panics.
The second problem is that as I understand it is impossible to fix the order in which cells are walked during calls of grid_disk_distances_safe
. Thus I can't encode the pattern by enumerating neighboring cells.
I think that there is no information in the index that can help me either. Index encodes the path from the base cell to desired one through layers and does not contain spatial information about neighbors' order.
The question
How to encode the pattern of cells to reproduce it around a given index?