Unidirectional edge functions
Unidirectional edges allow encoding the directed edge from one cell to a neighboring cell.
h3IndexesAreNeighbors
- C
- Python
- Java
- JavaScript (Live)
int h3IndexesAreNeighbors(H3Index origin, H3Index destination);
h3.h3_indexes_are_neighbors(origin, destination)
boolean h3IndexesAreNeighbors(long origin, long destination);
boolean h3IndexesAreNeighbors(String origin, String destination);
h3.h3IndexesAreNeighbors(origin, destination)
Returns whether or not the provided H3Indexes are neighbors.
Returns 1 if the indexes are neighbors, 0 otherwise.
getH3UnidirectionalEdge
- C
- Python
- Java
- JavaScript (Live)
H3Index getH3UnidirectionalEdge(H3Index origin, H3Index destination);
h3.get_h3_unidirectional_edge(origin, destination)
long getH3UnidirectionalEdge(long origin, long destination);
String getH3UnidirectionalEdge(String origin, String destination);
h3.getH3UnidirectionalEdge(h3Index)
Returns a unidirectional edge H3 index based on the provided origin and destination.
Returns 0 on error.
h3UnidirectionalEdgeIsValid
- C
- Python
- Java
- JavaScript (Live)
int h3UnidirectionalEdgeIsValid(H3Index edge);
h3.h3_unidirectional_edge_is_valid(edge)
boolean h3UnidirectionalEdgeIsValid(long edge);
boolean h3UnidirectionalEdgeIsValid(String edgeAddress);
h3.h3UnidirectionalEdgeIsValid(edge)
Determines if the provided H3Index is a valid unidirectional edge index.
Returns 1 if it is a unidirectional edge H3Index, otherwise 0.
getOriginH3IndexFromUnidirectionalEdge
- C
- Python
- Java
- JavaScript (Live)
H3Index getOriginH3IndexFromUnidirectionalEdge(H3Index edge);
h3.get_origin_h3_index_from_unidirectional_edge(edge)
long getOriginH3IndexFromUnidirectionalEdge(long edge);
String getOriginH3IndexFromUnidirectionalEdge(String edgeAddress);
h3.getOriginH3IndexFromUnidirectionalEdge(h3Index)
Returns the origin hexagon from the unidirectional edge H3Index.
getDestinationH3IndexFromUnidirectionalEdge
- C
- Python
- Java
- JavaScript (Live)
H3Index getDestinationH3IndexFromUnidirectionalEdge(H3Index edge);
h3.get_destination_h3_index_from_unidirectional_edge(edge)
long getDestinationH3IndexFromUnidirectionalEdge(long edge);
String getDestinationH3IndexFromUnidirectionalEdge(String edgeAddress);
h3.getDestinationH3IndexFromUnidirectionalEdge(edge)
Returns the destination hexagon from the unidirectional edge H3Index.
getH3IndexesFromUnidirectionalEdge
- C
- Python
- Java
- JavaScript (Live)
void getH3IndexesFromUnidirectionalEdge(H3Index edge, H3Index* originDestination);
h3.get_h3_indexes_from_unidirectional_edge(edge)
List<Long> getH3IndexesFromUnidirectionalEdge(long edge);
List<String> getH3IndexesFromUnidirectionalEdge(String edgeAddress);
h3.getH3IndexesFromUnidirectionalEdge(edge)
Returns the origin, destination pair of hexagon IDs for the given edge ID, which are placed at originDestination[0]
and
originDestination[1]
respectively.
getH3UnidirectionalEdgesFromHexagon
- C
- Python
- Java
- JavaScript (Live)
void getH3UnidirectionalEdgesFromHexagon(H3Index origin, H3Index* edges);
h3.get_h3_unidirectional_edges_from_hexagon(h)
List<Long> getH3UnidirectionalEdgesFromHexagon(long h3);
List<String> getH3UnidirectionalEdgesFromHexagon(String h3);
h3.getH3UnidirectionalEdgesFromHexagon(h3Index)
Provides all of the unidirectional edges from the current H3Index. edges
must be of length 6,
and the number of unidirectional edges placed in the array may be less than 6.
getH3UnidirectionalEdgeBoundary
- C
- Python
- Java
- JavaScript (Live)
void getH3UnidirectionalEdgeBoundary(H3Index edge, GeoBoundary* gb);
h3.get_h3_unidirectional_edge_boundary(edge, geo_json=False)
List<GeoCoord> getH3UnidirectionalEdgeBoundary(long edge);
List<GeoCoord> getH3UnidirectionalEdgeBoundary(String edgeAddress);
h3.getH3UnidirectionalEdgeBoundary(edge, [formatAsGeoJson])
Provides the coordinates defining the unidirectional edge.