website/docs/core-library/latLngToCellDesc.md
This operation is performed by function latLngToCell. See the comments in the function for more detail.
The conversion is performed as a series of coordinate system conversions described below. See the page Coordinate Systems used by the H3 Core Library for more information on each of these coordinate systems.
The input latitude/longitude coordinate is first converted into the containing icosahedron face and a Hex2d coordinate on that face using function _geoToHex2d, which determines the correct face and then performs a face-centered gnomonic projection into face-centered polar coordinates. These polar coordinates are then scaled appropriately to a Hex2d coordinate on the input grid resolution r.
The Hex2d coordinate is converted into resolution r normalized ijk coordinates using function _hex2dToCoordIJK.
The face and face-centered ijk coordinates are then converted into an H3Index representation using the following steps: