Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
These functions are used for finding the H3 cell index containing coordinates, and for finding the center and boundary of H3 indexes.
Synopsis
- latLngToCell :: LatLng -> Int -> Either H3ErrorCodes H3Index
- cellToLatLng :: H3Index -> Either H3ErrorCodes LatLng
- cellToBoundary :: H3Index -> Either H3ErrorCodes [LatLng]
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.