module H3.Vertexes
( cellToVertex
, cellToVertexes
, vertexToLatLng
, isValidVertex
) where
import H3.Internal.H3Api
( LatLng
, H3ErrorCodes
, H3Index
, c2hs_cellToVertex
, c2hs_vertexToLatLng
)
import H3.Internal.FFI
( hsCellToVertexes
, isValidVertex
)
import H3.Internal.Utils (toEither)
cellToVertex :: H3Index
-> Int
-> Either H3ErrorCodes H3Index
cellToVertex :: H3Index -> Int -> Either H3ErrorCodes H3Index
cellToVertex H3Index
origin = (H3Error, H3Index) -> Either H3ErrorCodes H3Index
forall a. (H3Error, a) -> Either H3ErrorCodes a
toEither ((H3Error, H3Index) -> Either H3ErrorCodes H3Index)
-> (Int -> (H3Error, H3Index))
-> Int
-> Either H3ErrorCodes H3Index
forall b c a. (b -> c) -> (a -> b) -> a -> c
. H3Index -> Int -> (H3Error, H3Index)
c2hs_cellToVertex H3Index
origin
vertexToLatLng :: H3Index -> Either H3ErrorCodes LatLng
vertexToLatLng :: H3Index -> Either H3ErrorCodes LatLng
vertexToLatLng = (H3Error, LatLng) -> Either H3ErrorCodes LatLng
forall a. (H3Error, a) -> Either H3ErrorCodes a
toEither ((H3Error, LatLng) -> Either H3ErrorCodes LatLng)
-> (H3Index -> (H3Error, LatLng))
-> H3Index
-> Either H3ErrorCodes LatLng
forall b c a. (b -> c) -> (a -> b) -> a -> c
. H3Index -> (H3Error, LatLng)
c2hs_vertexToLatLng
cellToVertexes :: H3Index -> Either H3ErrorCodes [H3Index]
cellToVertexes :: H3Index -> Either H3ErrorCodes [H3Index]
cellToVertexes = (H3Error, [H3Index]) -> Either H3ErrorCodes [H3Index]
forall a. (H3Error, a) -> Either H3ErrorCodes a
toEither ((H3Error, [H3Index]) -> Either H3ErrorCodes [H3Index])
-> (H3Index -> (H3Error, [H3Index]))
-> H3Index
-> Either H3ErrorCodes [H3Index]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. H3Index -> (H3Error, [H3Index])
hsCellToVertexes