Skip to content

Commit

Permalink
vertex.mdx
Browse files Browse the repository at this point in the history
  • Loading branch information
ajfriend committed Oct 26, 2024
1 parent 9afce45 commit 89fcab8
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions website/docs/api/vertex.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ Vertex mode allows encoding the topological vertexes of H3 cells.

## cellToVertex

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.

<Tabs
groupId="language"
defaultValue="c"
Expand Down Expand Up @@ -82,11 +85,10 @@ $ h3 cellToVertex -v 2 -c 85283473fffffff
</TabItem>
</Tabs>

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.

## cellToVertexes

Returns the indexes for all vertexes of the given cell.

<Tabs
groupId="language"
defaultValue="c"
Expand All @@ -104,6 +106,10 @@ for hexagonal cells, and 0 and 4 (inclusive) for pentagonal cells.
H3Error cellToVertexes(H3Index origin, H3Index *out);
```
The length of the `out` array must be 6.
If the given cell is a pentagon, one member of the
array will be set to `0`.
</TabItem>
<TabItem value="java">
Expand Down Expand Up @@ -155,13 +161,10 @@ $ h3 cellToVertexes -c 85283473fffffff
</TabItem>
</Tabs>

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`.

## vertexToLatLng

Returns the latitude and longitude coordinates of the given vertex.

<Tabs
groupId="language"
defaultValue="c"
Expand Down Expand Up @@ -230,10 +233,10 @@ $ h3 vertexToLatLng -c 255283463fffffff
</TabItem>
</Tabs>

Returns the latitude and longitude coordinates of the given vertex.

## isValidVertex

Determines if the given H3 index represents a valid H3 vertex.

<Tabs
groupId="language"
defaultValue="c"
Expand All @@ -251,6 +254,8 @@ 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.
</TabItem>
<TabItem value="java">
Expand Down Expand Up @@ -301,5 +306,3 @@ true
</TabItem>
</Tabs>
Returns 1 if the given index represents a valid H3 vertex.

0 comments on commit 89fcab8

Please sign in to comment.