You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* change H3_INVALID_INDEX to H3_NULL
* document H3_NULL in the naming RFC
* some formatting happened
* tell the people about `git clean -ffdx`
* H3_INVALID_INDEX -> H3_NULL from Nick's change
* formatting happened
* build and clean instructions
* where to run `make`
* brew to `brew`, and no need to be stingy
* Docs on Mode 0 vs H3_NULL
* to the future!
* add the `build` back into the .gitignore
* I get H3_INIT now
* going backwards on going forward
Copy file name to clipboardExpand all lines: README.md
+16-4Lines changed: 16 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ Documentation is available at [https://uber.github.io/h3/](https://uber.github.i
19
19
20
20
We recommend using prebuilt bindings if they are available for your programming language. Bindings for [Go](https://github.com/uber/h3-go), [Java](https://github.com/uber/h3-java), [JavaScript](https://github.com/uber/h3-js), [Python](https://github.com/uber/h3-py), and [others](https://uber.github.io/h3/#/documentation/community/bindings) are available.
First make sure you [have the developer tools installed](http://osxdaily.com/2014/02/12/install-command-line-tools-mac-os-x/) and then
52
52
@@ -63,19 +63,31 @@ You will need to install CMake and Visual Studio, including the Visual C++ compi
63
63
64
64
#### Compilation
65
65
66
-
From the repository you would then compile like so:
66
+
From the repository root, you can compile H3 with:
67
67
68
68
```
69
-
cmake .
69
+
mkdir build
70
+
cd build
71
+
cmake ..
70
72
make
71
73
```
72
74
75
+
All subsequent `make` commands should be run from within the `build` directory.
76
+
77
+
**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.
78
+
73
79
You can install system-wide with:
74
80
75
81
```
76
82
sudo make install
77
83
```
78
84
85
+
If using the method above, from the repository root, you can clean all build artifacts with:
86
+
87
+
```
88
+
rm -rf build
89
+
```
90
+
79
91
#### Testing
80
92
81
93
After making the project, you can test with `make test`, and if `lcov` is installed you can `make coverage` to generate a code coverage report.
Copy file name to clipboardExpand all lines: docs/core-library/h3indexing.md
+12-1Lines changed: 12 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,18 @@ Child hexagons are linearly smaller than their parent hexagons.
13
13
14
14
## H3Index Representation
15
15
16
-
The **H3Index** is the integer representation of an **H3** index, which can be placed into multiple modes to indicate the kind of concept being indexed. Mode 1 is an **H3** Cell (Hexagon) Index, mode 2 is an **H3** Unidirectional Edge (Hexagon A -> Hexagon B) Index, mode 3 is planned to be a bidirectional edge (Hexagon A <-> Hexagon B). Mode 0 is reserved and indicates an invalid **H3** index.
16
+
The **H3Index** is the integer representation of an **H3** index, which can be placed into multiple modes to indicate the concept being indexed.
17
+
18
+
* Mode 1 is an **H3** Cell (Hexagon/Pentagon) index.
19
+
* Mode 2 is an **H3** Unidirectional Edge (Cell A -> Cell B) index.
20
+
* Mode 3 is planned to be a bidirectional edge (Cell A <-> Cell B).
21
+
* Mode 0 is reserved and indicates an invalid **H3** index.
22
+
* This mode remains, partially, for backwards compatibility with an older version of H3.
23
+
24
+
Mode 0 contains a special index, `H3_NULL`, which is unique: it is bit-equivalent to `0`.
25
+
This index indicates, *specifically*, an invalid, missing, or uninitialized **H3** index;
26
+
it is analogous to `NaN` in floating point.
27
+
It should be used instead of an arbitrary Mode 0 index, due to its uniqueness and easy identifiability.
17
28
18
29
The components of the **H3** cell index (mode 1) are packed into a 64-bit integer in order, highest bit first, as follows:
0 commit comments