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

H3.Indexing

Description

These functions are used for finding the H3 cell index containing coordinates, and for finding the center and boundary of H3 indexes.

Synopsis

Documentation

latLngToCell :: LatLng -> Int -> Either H3ErrorCodes H3Index Source #

Indexes the location at the specified resolution, returning the index of the cell containing the location. This buckets the geographic point into the H3 grid. Note that we are directly binding to the C method, which expects Latitude and Longitude in radians. This differs from the python bindings which expect the coordinates in degrees and perform the necessary conversion for the user.

cellToLatLng :: H3Index -> Either H3ErrorCodes LatLng Source #

Finds the center of the cell in grid space.

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

Finds the boundary of the cell, returning a list of coordinates.