Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Directed edges allow encoding the directed edge from one cell to a neighboring cell.
Synopsis
- isValidDirectedEdge :: H3Index -> Bool
- directedEdgeToCells :: H3Index -> Either H3ErrorCodes [H3Index]
- originToDirectedEdges :: H3Index -> Either H3ErrorCodes [H3Index]
- areNeighborCells :: H3Index -> H3Index -> Either H3ErrorCodes Bool
- cellsToDirectedEdge :: H3Index -> H3Index -> Either H3ErrorCodes H3Index
- getDirectedEdgeOrigin :: H3Index -> Either H3ErrorCodes H3Index
- getDirectedEdgeDestination :: H3Index -> Either H3ErrorCodes H3Index
- directedEdgeToBoundary :: H3Index -> Either H3ErrorCodes [LatLng]
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.
:: 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.