Skip to main content
Version: 4.x

Vertex functions

Vertex mode allows encoding the topological vertexes of H3 cells.


H3Error cellToVertex(H3Index origin, int vertexNum, H3Index *out);

Returns the index for the specified cell vertex. Valid vertex numbers are between 0 and 5 (inclusive) for hexagonal cells, and 0 and 4 (inclusive) for pentagonal cells.


H3Error cellToVertexes(H3Index origin, H3Index *out);

Returns the indexes for all vertexes of the given cell index.

The length of the out array must be 6. If the given cell index represents a pentagon, one member of the array will be set to 0.


H3Error vertexToLatLng(H3Index vertex, LatLng *point);

Returns the latitude and longitude coordinates of the given vertex.


int isValidVertex(H3Index vertex);

Returns 1 if the given index represents a valid H3 vertex.