Directed Edges
Functions for working with directed edges between neighboring H3 cells.
Corresponds to the H3 C API Directed Edges section.
FastH3.cellsToDirectedEdge — Function
cellsToDirectedEdge(origin::H3Index, destination::H3Index) -> (H3Error, H3Index)Create a directed edge H3 index from an origin cell to a neighboring destination cell.
See also the H3 C API: cellsToDirectedEdge
FastH3.isValidDirectedEdge — Function
isValidDirectedEdge(edge::H3Index) -> BoolCheck whether an H3 index represents a valid directed edge.
See also the H3 C API: isValidDirectedEdge
FastH3.getDirectedEdgeOrigin — Function
getDirectedEdgeOrigin(edge::H3Index) -> (H3Error, H3Index)Get the origin cell of a directed edge.
See also the H3 C API: getDirectedEdgeOrigin
FastH3.getDirectedEdgeDestination — Function
getDirectedEdgeDestination(edge::H3Index) -> (H3Error, H3Index)Get the destination cell of a directed edge by finding the neighbor of the origin in the encoded direction.
See also the H3 C API: getDirectedEdgeDestination
FastH3.directedEdgeToCells — Function
directedEdgeToCells(edge::H3Index) -> (H3Error, H3Index, H3Index)Get both the origin and destination cells of a directed edge.
See also the H3 C API: directedEdgeToCells
FastH3.originToDirectedEdges — Function
originToDirectedEdges(op::F, origin::H3Index) -> H3Error where {F}Call op(edge) for each directed edge originating from the cell (no result vector allocated).
See also the H3 C API: originToDirectedEdges
originToDirectedEdges(origin::H3Index) -> (H3Error, Vector{H3Index})Get all directed edges originating from a cell (6 for hexagons, 5 for pentagons).
See also the H3 C API: originToDirectedEdges
FastH3.directedEdgeToBoundary — Function
directedEdgeToBoundary(edge::H3Index) -> (H3Error, CellBoundary)Get the boundary vertices shared between the origin and destination cells of a directed edge.
See also the H3 C API: directedEdgeToBoundary
FastH3.reverseDirectedEdge — Function
reverseDirectedEdge(edge::H3Index) -> (H3Error, H3Index)Get the directed edge in the reverse direction (swapping origin and destination).