Unidirectional edges allow encoding the directed edge from one cell to a neighboring cell.
int Api.H3IndexesAreNeighbors(H3Index origin, H3Index destination)
Returns whether or not the provided H3Indexes are neighbors.
Returns 1 if the indexes are neighbors, 0 otherwise.
Name | Type | Description |
---|---|---|
origin | H3Lib.H3Index | Origin looking for neighbor |
destination | H3Lib.H3Index | Cell being tested if neighbor |
H3Index Api.GetH3UnidirectionalEdge(H3Index origin, H3Index destination)
Returns a unidirectional edge H3 index based on the provided origin and destination.
Returns 0 on error.
Name | Type | Description |
---|---|---|
origin | H3Lib.H3Index | Origin cell for edge |
destination | H3LIb.H3Index | Destination cell for edge |
int Api.H3UnidirectionalEdgeIsValid(H3Index edge)
Determines if the provided H3Index is a valid unidirectional edge index.
Returns 1 if it is a unidirectional edge H3Index, otherwise 0.
Name | Type | Description |
---|---|---|
edge | H3Lib.H3Index | Unidirectional edge being tested |
H3Index Api.GetOriginH3IndexFromUnidirectionalEdge(H3Index edge)
Returns the origin hexagon from the unidirectional edge H3Index.
Name | Type | Description |
---|---|---|
edge | H3Lib.H3Index | Edge to find origin cell |
H3Index Api.GetDestinationH3IndexFromUnidirectionalEdge(H3Index edge)
Returns the destination hexagon from the unidirectional edge H3Index.
Name | Type | Description |
---|---|---|
edge | H3Lib.H3Index | Edge to find destination cell |
void Api.GetH3IndexesFromUnidirectionalEdge(H3Index edge, out (H3Index, H3Index) originDestination)
Returns the origin, destination pair of hexagon IDs for the given edge ID, which are placed at originDestination.Item1 and originDestination.Item2 respectively.
Name | Type | Description |
---|---|---|
edge | H3Lib.H3Index | Edge to find origin and destination cells |
originDestination | out Tuple<H3Lib.H3Index, H3Lib.H3Index> | paired origin/destination H3Index cells for edge |
void Api.GetH3UnidirectionalEdgesFromHexagon(H3Index origin, out List<H3Index> edges)
Provides all of the unidirectional edges from the current H3Index. The number of undirectional edges placed in edges may be less than 6.
Name | Type | Description |
---|---|---|
origin | H3Lib.H3Index | Origin cell to get edges from |
edges | out List<H3Lib.H3Index> | The edges originating from the cell |
void Api.GetH3UnidirectionalEdgeBoundary(H3Index edge, out GeoBoundary gb)
Provides the coordinates defining the unidirectional edge.
Name | Type | Description |
---|---|---|
edge | H3Lib.H3Index | Edge to find coordinates of |
gb | out H3Lib.GeoBoundary | The geoboundary that defines the edge in terms of vertices |