dev-docs/RFCs/v4.0.0/vertex-mode-rfc.md
This proposal would add a new H3 index mode, Vertex Mode, to provide a canonical id for a vertex in a cell boundary. Each vertex shared by 3 adjacent cells would be represented by a single index.
The advantages of this approach:
At a minimum, this should open up significant performance and correctness gains in h3SetToLinkedGeo and directedEdgeToBoundary, and there are likely other uses as well.
The proposed approach below is fairly straightforward. The main questions are:
Whether to have one vertex mode, H3_VERTEX_MODE, representing the 5 or 6 topological vertices of each cell, or whether to additionally offer a second vertex mode, H3_ICOSAEDGE_VERTEX_MODE, to represent distortion vertices shared by two cells whose edge crosses an edge of the icosahedron.
If we have two different modes, which functions return both types, in order, and which functions return only one type.
These two modes are largely orthogonal, and it would be possible to implement only H3_VERTEX_MODE first without considering H3_ICOSAEDGE_VERTEX_MODE. This simplifies the implementation and keeps the new mode wholly in the topological space, without considering the geometric issues posed by the distortion vertices. However this may make it harder or more expensive to implement transformations from sets of vertices to the geometry of a polygon or edge.
H3_VERTEX_MODEcellToBoundaryProposed simple algorithm for determining ownership:
void getCellVertexes(H3Index cell, H3Vertex *vertices)H3Vertex getCellVertex(H3Index cell, int vertIndex)LatLng vertexToLatLng(H3Vertex vertex)