As an open-source project, uber/h3 has picked up 6.7k stars on GitHub (C). Hexagonal hierarchical geospatial indexing system
Snapshot summary built from the project's own GitHub metadata — there's no written TopGit review yet. The page will update automatically when a full review is published.
WHY NO REVIEW YET
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then — see the READ ME tab for the original README in full.
H3: A Hexagonal Hierarchical Geospatial Indexing System
H3 is a geospatial indexing system using a hexagonal grid that can be (approximately) subdivided into finer and finer hexagonal grids, combining the benefits of a hexagonal grid with S2's hierarchical subdivisions.
Documentation is available at https://h3geo.org/. Developer documentation in Markdown format is available under the dev-docs directory.
Post bug reports or feature requests to the GitHub Issues page
Ask questions by posting to the H3 tag on StackOverflow
There is also an H3 Slack workspace
Installing
We recommend using prebuilt bindings if they are available for your programming language. Bindings for Java, JavaScript, Python, and others are available.
On macOS, you can install H3 using brew:
brew install h3
Otherwise, to build H3 from source, please see the following instructions.
Building from source
Still here? To build the H3 C library, you'll need a C compiler (tested with gcc and clang), CMake, and Make. If you intend to contribute to H3, you must have clang-format installed and we recommend installing ccmake and LCOV to configure the cmake arguments to build and run the tests and generate the code coverage report. We also recommend using gcc for the code coverage as some versions of clang generate annotations that aren't compatible with lcov. Doxygen is needed to build the API documentation.
Install build-time dependencies
Alpine
# Installing the bare build requirements
apk add cmake make gcc libtool musl-dev
Debian/Ubuntu
# Installing the bare build requirements
sudo apt install cmake make gcc libtool
# Installing useful tools for development
sudo apt install clang-format cmake-curses-gui lcov doxygen
macOS (using brew)
First make sure you have the developer tools installed and then
# Installing the bare build requirements
brew install cmake
# Installing useful tools for development
brew install clang-format lcov doxygen
Windows (Visual Studio)
You will need to install CMake and Visual Studio, including the Visual C++ compiler. For building on Windows, please follow the Windows build instructions.
When checking out the H3 Git repository, by default you will check out the latest
development version of H3. When using H3 in an application, you will want to check
out the most recently released version:
git checkout v$(<VERSION)
From the repository root, you can compile H3 with:
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make
All subsequent make commands should be run from within the build directory.
Note: There are several ways to build H3 with CMake; the method above is just one example that restricts all build artifacts to the build directory.
You can install system-wide with:
sudo make install
If using the method above, from the repository root, you can clean all build artifacts with:
rm -rf build
Testing
After making the project, you can test with make test.
You can run a faster test suite that excludes the most expensive tests with make test-fast.
Coverage
You can generate a code coverage report if lcov is installed, and if the project was built with the CMAKE_BUILD_TYPE=Debug and ENABLE_COVERAGE=ON options.
For example, from a clean repository, you could run:
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Debug -DENABLE_COVERAGE=ON ..
make
make coverage
You can then view a detailed HTML coverage report by opening coverage/index.html in your browser.
Benchmarks
You can run timing benchmarks by building with the CMAKE_BUILD_TYPE=Release, and running make benchmarks:
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make
make benchmarks
Documentation
You can build developer documentation with make docs if Doxygen was installed when CMake was run. Index of the documentation will be dev-docs/_build/html/index.html.
After making the project, you can build KML files to visualize the hexagon grid with make kml. The files will be placed in KML.
To build the documentation website, see the website/ directory.
10 is the H3 resolution, between 0 (coarsest) and 15 (finest). The coordinates entered are the latitude and longitude, in degrees, you want the index for (these coordinates are the Statue of Liberty). You should get an H3 index as output, like 8a2a1072b59ffff.
You can then take this index and get some information about it, for example:
./bin/cellToBoundary --index 8a2a1072b59ffff
This will produce the vertices of the hexagon at this location:
Yes — uber/h3 ships under the Apache-2.0 license, which makes its source code freely readable (and, depending on license terms, forkable and reusable). Source: github.com/uber/h3.
What is uber/h3?
uber/h3 (uber/h3) is a C project on GitHub. From the project's own README: Hexagonal hierarchical geospatial indexing system
What license does uber/h3 use?
uber/h3 is released under the Apache-2.0 license. Always verify the LICENSE file directly on GitHub for the authoritative terms — license strings can be edited out of sync with a project's actual stance.
Where can I see uber/h3 in action?
The project maintains a homepage at https://h3geo.org. The README tab on this page also usually contains screenshots and a quickstart.
Where do I read more about uber/h3?
This TopGit page is a snapshot — the READ ME tab shows the project's own README content (links stripped, images preserved). The GitHub repository at github.com/uber/h3 is the definitive source.
Read full README in the tab above.
Want a second opinion on h3?
Ask an AI that can read this page — one click and you get its take on h3.