OCaml bindings to Uber's H3 C library for indexing geo points.
First install H3 per the H3 readme instructions.
Simple example using utop. First:
$ dune utop src
Then within utop
utop # let paris = {H3.lat=48.8566; H3.lng=2.3522};;
val paris : H3.lat_lng = {H3.lat = 48.8566; lng = 2.3522}
utop # let paris_h3 = H3.cell_of_lat_lng paris 9;;
val paris_h3 : int64 = 617550903642685439L
utop # Printf.printf "%Lx" paris_h3;;
891fb466257ffff- : unit = ()
See also examples/index.ml and examples/distance.ml which should exactly match the index.c and distance.c in the upstream Uber H3 C library.