h3-hs-0.2.0.0: A Haskell binding for H3
Safe HaskellSafe-Inferred
LanguageHaskell2010

H3.DirectedEdges

Description

Directed edges allow encoding the directed edge from one cell to a neighboring cell.

Synopsis

Documentation

isValidDirectedEdge :: H3Index -> Bool Source #

Determines if the provided H3Index is a valid unidirectional edge index.

directedEdgeToCells :: H3Index -> Either H3ErrorCodes [H3Index] Source #

Returns a list of length 2 consisting of the origin and the destination hexagon IDs for the given edge ID.

originToDirectedEdges :: H3Index -> Either H3ErrorCodes [H3Index] Source #

Provides all of the directed edges from the current H3Index. The return will be of length 6, but the number of directed edges placed in the array may be less than 6. If this is the case, one of the members of the array will be 0.

areNeighborCells :: H3Index -> H3Index -> Either H3ErrorCodes Bool Source #

Returns whether or not the provided H3 cell indexes are neighbors.

cellsToDirectedEdge Source #

Arguments

:: H3Index

origin

-> H3Index

destination

-> Either H3ErrorCodes H3Index 

Returns a unidirectional edge H3 index based on the provided origin and destination.

getDirectedEdgeOrigin :: H3Index -> Either H3ErrorCodes H3Index Source #

Returns the origin hexagon from the unidirectional edge H3Index.

getDirectedEdgeDestination :: H3Index -> Either H3ErrorCodes H3Index Source #

Returns the destination hexagon from the unidirectional edge H3Index.

directedEdgeToBoundary :: H3Index -> Either H3ErrorCodes [LatLng] Source #

Provides the coordinates defining the unidirectional edge.