Skip to content

travisbrady/ocaml-h3

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

ocaml-h3: OCaml bindings to Uber's H3 geospatial indexing system

Build Status License

Summary

Experimental bindings to Uber's H3 C library for indexing geo points.

Dependencies

First install H3 per the H3 readme instructions.

Example

Simple example using utop. First:

$ jbuilder utop src

Then within utop

utop # let paris = {H3.lat=48.8566; H3.lon=2.3522};;
val paris : H3.geo_coord = {H3.lat = 48.8566; lon = 2.3522}

utop # let paris_h3 = H3.h3_of_geo_coord 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.

About

OCaml bindings to Uber's H3 geospatial indexing system

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published