{"id":13399179,"url":"https://github.com/uber/h3","last_synced_at":"2025-07-29T00:04:47.412Z","repository":{"id":37546491,"uuid":"114948816","full_name":"uber/h3","owner":"uber","description":"Hexagonal hierarchical geospatial indexing system","archived":false,"fork":false,"pushed_at":"2025-07-25T19:47:44.000Z","size":51520,"stargazers_count":5428,"open_issues_count":127,"forks_count":515,"subscribers_count":993,"default_branch":"master","last_synced_at":"2025-07-26T02:28:19.950Z","etag":null,"topics":["geospatial","h3","hexagon","spatial-indexing","uber"],"latest_commit_sha":null,"homepage":"https://h3geo.org","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/uber.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-12-21T01:38:35.000Z","updated_at":"2025-07-25T19:44:05.000Z","dependencies_parsed_at":"2023-10-20T23:34:40.649Z","dependency_job_id":"b3ec1792-d3d8-47d5-b834-4951e9216ee7","html_url":"https://github.com/uber/h3","commit_stats":{"total_commits":1017,"total_committers":77,"mean_commits":"13.207792207792208","dds":0.7905604719764012,"last_synced_commit":"4618c831ae8672bd9993663c29124e386662918c"},"previous_names":[],"tags_count":38,"template":false,"template_full_name":null,"purl":"pkg:github/uber/h3","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uber%2Fh3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uber%2Fh3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uber%2Fh3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uber%2Fh3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/uber","download_url":"https://codeload.github.com/uber/h3/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uber%2Fh3/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267260641,"owners_count":24060945,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-26T02:00:08.937Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["geospatial","h3","hexagon","spatial-indexing","uber"],"created_at":"2024-07-30T19:00:34.919Z","updated_at":"2025-07-29T00:04:47.329Z","avatar_url":"https://github.com/uber.png","language":"C","readme":"\u003cimg align=\"right\" src=\"https://uber.github.io/img/h3Logo-color.svg\" alt=\"H3 Logo\" width=\"200\"\u003e\n\n# H3: A Hexagonal Hierarchical Geospatial Indexing System\n\n[![test-linux](https://github.com/uber/h3/workflows/test-linux/badge.svg)](https://github.com/uber/h3/actions)\n[![test-macos](https://github.com/uber/h3/workflows/test-macos/badge.svg)](https://github.com/uber/h3/actions)\n[![test-windows](https://github.com/uber/h3/workflows/test-windows/badge.svg)](https://github.com/uber/h3/actions)\n[![test-website](https://github.com/uber/h3/workflows/test-website/badge.svg)](https://github.com/uber/h3/actions)\n[![Coverage Status](https://coveralls.io/repos/github/uber/h3/badge.svg?branch=master)](https://coveralls.io/github/uber/h3?branch=master)\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE)\n\nH3 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](https://code.google.com/archive/p/s2-geometry-library/)'s hierarchical subdivisions.\n\nDocumentation is available at [https://h3geo.org/](https://h3geo.org/). Developer documentation in Markdown format is available under the [dev-docs](./dev-docs/) directory.\n\n * Post **bug reports or feature requests** to the [GitHub Issues page](https://github.com/uber/h3/issues)\n * Ask **questions** by posting to the [H3 tag on StackOverflow](https://stackoverflow.com/questions/tagged/h3)\n * There is also an [H3 Slack workspace](https://join.slack.com/t/h3-core/shared_invite/zt-g6u5r1hf-W_~uVJmfeiWtMQuBGc1NNg)\n\n## Installing\n\nWe recommend using prebuilt bindings if they are available for your programming language. Bindings for [Java](https://github.com/uber/h3-java), [JavaScript](https://github.com/uber/h3-js), [Python](https://github.com/uber/h3-py), and [others](https://h3geo.org/docs/community/bindings) are available.\n\nOn macOS, you can install H3 using `brew`:\n```\nbrew install h3\n```\nOtherwise, to build H3 from source, please see the following instructions.\n\n### Building from source\n\nStill here? To build the H3 C library, you'll need a C compiler (tested with `gcc` and `clang`), [CMake](https://cmake.org/), and [Make](https://www.gnu.org/software/make/). If you intend to contribute to H3, you must have [clang-format](https://clang.llvm.org/docs/ClangFormat.html) installed and we recommend installing [ccmake](https://cmake.org/cmake/help/v3.0/manual/ccmake.1.html) and [LCOV](http://ltp.sourceforge.net/coverage/lcov.php) 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](https://www.doxygen.nl/index.html) is needed to build the API documentation.\n\n#### Install build-time dependencies\n\n* Alpine\n```\n# Installing the bare build requirements\napk add cmake make gcc libtool musl-dev\n```\n\n* Debian/Ubuntu\n\n```\n# Installing the bare build requirements\nsudo apt install cmake make gcc libtool\n# Installing useful tools for development\nsudo apt install clang-format cmake-curses-gui lcov doxygen\n```\n\n* macOS (using `brew`)\n\nFirst make sure you [have the developer tools installed](http://osxdaily.com/2014/02/12/install-command-line-tools-mac-os-x/) and then\n\n```\n# Installing the bare build requirements\nbrew install cmake\n# Installing useful tools for development\nbrew install clang-format lcov doxygen\n```\n\n* Windows (Visual Studio)\n\nYou will need to install CMake and Visual Studio, including the Visual C++ compiler. For building on Windows, please follow the [Windows build instructions](dev-docs/build_windows.md).\n\n* FreeBSD\n\n ```\n# Installing the build requirements\nsudo pkg install bash cmake gmake doxygen lcov\n```\n\n#### Compilation\n\nWhen checking out the H3 Git repository, by default you will check out the latest\ndevelopment version of H3. When using H3 in an application, you will want to check\nout the most recently released version:\n\n```\ngit checkout v$(\u003cVERSION)\n```\n\nFrom the repository root, you can compile H3 with:\n\n```\nmkdir build\ncd build\ncmake -DCMAKE_BUILD_TYPE=Release ..\nmake\n```\n\nAll subsequent `make` commands should be run from within the `build` directory.\n\n**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.\n\nYou can install system-wide with:\n\n```\nsudo make install\n```\n\nIf using the method above, from the repository root, you can clean all build artifacts with:\n\n```\nrm -rf build\n```\n\n#### Testing\n\nAfter making the project, you can test with `make test`.\nYou can run a faster test suite that excludes the most expensive tests with `make test-fast`.\n\n#### Coverage\n\nYou 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.\nFor example, from a clean repository, you could run:\n\n```\nmkdir build\ncd build\ncmake -DCMAKE_BUILD_TYPE=Debug -DENABLE_COVERAGE=ON ..\nmake\nmake coverage\n```\n\nYou can then view a detailed HTML coverage report by opening `coverage/index.html` in your browser.\n\n#### Benchmarks\n\nYou can run timing benchmarks by building with the `CMAKE_BUILD_TYPE=Release`, and running `make benchmarks`:\n\n```\nmkdir build\ncd build\ncmake -DCMAKE_BUILD_TYPE=Release ..\nmake\nmake benchmarks\n```\n\n#### Documentation\n\nYou 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`.\n\nAfter making the project, you can build KML files to visualize the hexagon grid with `make kml`. The files will be placed in `KML`.\n\nTo build the documentation website, see the [website/](./website/) directory.\n\n## Usage\n\n### From the command line\n\nTo get the H3 index for some location:\n\n```\n./bin/latLngToCell --resolution 10 --latitude 40.689167 --longitude -74.044444\n```\n\n10 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`.\n\nYou can then take this index and get some information about it, for example:\n\n```\n./bin/cellToBoundary --index 8a2a1072b59ffff\n```\n\nThis will produce the vertices of the hexagon at this location:\n\n```\n8a2a1072b59ffff\n{\n   40.690058601 -74.044151762\n   40.689907695 -74.045061792\n   40.689270936 -74.045341418\n   40.688785091 -74.044711031\n   40.688935993 -74.043801021\n   40.689572744 -74.043521377\n}\n```\n\nYou can get the center coordinate of the hexagon like so:\n\n```\n./bin/cellToLatLng --index 8a2a1072b59ffff\n```\n\nThis will produce some coordinate:\n\n```\n40.6894218437 -74.0444313999\n```\n\n### From C\n\nThe above features of H3 can also be used from C. For example, you can compile and run [examples/index.c](./examples/index.c) like so:\n\n```\ncc -lh3 examples/index.c -o example\n./example\n```\n\nYou should get output like:\n\n```\nThe index is: 8a2a1072b59ffff\nBoundary vertex #0: 40.690059, -74.044152\nBoundary vertex #1: 40.689908, -74.045062\nBoundary vertex #2: 40.689271, -74.045341\nBoundary vertex #3: 40.688785, -74.044711\nBoundary vertex #4: 40.688936, -74.043801\nBoundary vertex #5: 40.689573, -74.043521\nCenter coordinates: 40.689422, -74.044431\n```\n\n## Contributing\n\nPull requests and Github issues are welcome. Please see our [contributing guide](./CONTRIBUTING.md) for more information.\n\nBefore we can merge your changes, you must agree to the [Uber Contributor License Agreement](https://cla-assistant.io/uber/h3).\n\n## Legal and Licensing\n\nH3 is licensed under the [Apache 2.0 License](./LICENSE).\n\nDGGRID\nCopyright (c) 2015 Southern Oregon University\n","funding_links":[],"categories":["C","Maps","others","Geospatial Library"],"sub_categories":["Other","C"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuber%2Fh3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuber%2Fh3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuber%2Fh3/lists"}