All Projects → uber → H3

uber / H3

Licence: apache-2.0
Hexagonal hierarchical geospatial indexing system

Programming Languages

c
50402 projects - #5 most used programming language
CMake
9771 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to H3

H3.net
Port of Uber's H3 to .NET
Stars: ✭ 27 (-99.15%)
Mutual labels:  h3, geospatial, hexagon, spatial-indexing
h3-r
R bindings for H3, a hierarchical hexagonal geospatial indexing system
Stars: ✭ 57 (-98.2%)
Mutual labels:  h3, geospatial, hexagon, spatial-indexing
h3net
H3NET: A Hexagonal Hierarchical Geo-spatial Indexing System In C#
Stars: ✭ 20 (-99.37%)
Mutual labels:  h3, hexagon, spatial-indexing
placekey-js
placekey.io
Stars: ✭ 19 (-99.4%)
Mutual labels:  h3, geospatial
H3 Go
Go bindings for H3, a hierarchical hexagonal geospatial indexing system
Stars: ✭ 118 (-96.27%)
Mutual labels:  uber, geospatial
placekey-py
placekey.io
Stars: ✭ 49 (-98.45%)
Mutual labels:  h3, geospatial
h3ron
Rust crates for the H3 geospatial indexing system
Stars: ✭ 52 (-98.36%)
Mutual labels:  h3, geospatial
H3 Js
h3-js provides a JavaScript version of H3, a hexagon-based geospatial indexing system.
Stars: ✭ 418 (-86.8%)
Mutual labels:  uber, geospatial
H3 Py
Python bindings for H3, a hierarchical hexagonal geospatial indexing system
Stars: ✭ 354 (-88.82%)
Mutual labels:  uber, geospatial
H3 Py Notebooks
Jupyter notebooks for h3-py, a hierarchical hexagonal geospatial indexing system
Stars: ✭ 82 (-97.41%)
Mutual labels:  uber, geospatial
H3 Java
Java bindings for H3, a hierarchical hexagonal geospatial indexing system
Stars: ✭ 150 (-95.26%)
Mutual labels:  uber, geospatial
Openglobus
JavaScript 3d maps and geospatial data visualization engine library.
Stars: ✭ 199 (-93.72%)
Mutual labels:  geospatial
Whitebox Python
WhiteboxTools Python Frontend
Stars: ✭ 188 (-94.06%)
Mutual labels:  geospatial
Expo Uber
Uber UI Clone with React Native & Expo
Stars: ✭ 186 (-94.13%)
Mutual labels:  uber
Ridesharing Android
Ridesharing driver & rider sample apps using HyperTrack SDK
Stars: ✭ 186 (-94.13%)
Mutual labels:  uber
Calcite
Apache Calcite
Stars: ✭ 2,816 (-11.08%)
Mutual labels:  geospatial
Atari Model Zoo
A binary release of trained deep reinforcement learning models trained in the Atari machine learning benchmark, and a software release that enables easy visualization and analysis of models, and comparison across training algorithms.
Stars: ✭ 198 (-93.75%)
Mutual labels:  uber
Awesome Geospatial Companies
🌐 List of 500+ geospatial companies (GIS, Earth Observation, UAV, Satellite, Digital Farming, ..)
Stars: ✭ 184 (-94.19%)
Mutual labels:  geospatial
Pygeoapi
pygeoapi is a Python server implementation of the OGC API suite of standards. The project emerged as part of the next generation OGC API efforts in 2018 and provides the capability for organizations to deploy a RESTful OGC API endpoint using OpenAPI, GeoJSON, and HTML. pygeoapi is open source and released under an MIT license.
Stars: ✭ 178 (-94.38%)
Mutual labels:  geospatial
Displaz
A hackable lidar viewer
Stars: ✭ 177 (-94.41%)
Mutual labels:  geospatial

H3 Logo

H3: A Hexagonal Hierarchical Geospatial Indexing System

test-linux test-macos test-windows test-website Coverage Status License

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.

Installing

We recommend using prebuilt bindings if they are available for your programming language. Bindings for Go, 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.

  • FreeBSD
# Installing the build requirements
sudo pkg install bash cmake gmake doxygen lcov

Compilation

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 ..
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 option. For example, from a clean repository, you could run:

mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Debug ..
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.

Usage

From the command line

To get the H3 index for some location:

./bin/latLngToCell --resolution 10 --latitude 40.689167 --longitude -74.044444

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:

8a2a1072b59ffff
{
   40.690058601 -74.044151762
   40.689907695 -74.045061792
   40.689270936 -74.045341418
   40.688785091 -74.044711031
   40.688935993 -74.043801021
   40.689572744 -74.043521377
}

You can get the center coordinate of the hexagon like so:

./bin/cellToLatLng --index 8a2a1072b59ffff

This will produce some coordinate:

40.6894218437 -74.0444313999

From C

The above features of H3 can also be used from C. For example, you can compile and run examples/index.c like so:

cc -lh3 examples/index.c -o example
./example

You should get output like:

The index is: 8a2a1072b59ffff
Boundary vertex #0: 40.690059, -74.044152
Boundary vertex #1: 40.689908, -74.045062
Boundary vertex #2: 40.689271, -74.045341
Boundary vertex #3: 40.688785, -74.044711
Boundary vertex #4: 40.688936, -74.043801
Boundary vertex #5: 40.689573, -74.043521
Center coordinates: 40.689422, -74.044431

Contributing

Pull requests and Github issues are welcome. Please see our contributing guide for more information.

Before we can merge your changes, you must agree to the Uber Contributor License Agreement.

Legal and Licensing

H3 is licensed under the Apache 2.0 License.

DGGRID Copyright (c) 2015 Southern Oregon University

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].