@@ -8,7 +8,7 @@ This library provides Java bindings for the [H3 Core Library](https://github.com
8
8
9
9
Add it to your pom.xml:
10
10
11
- ```
11
+ ``` xml
12
12
<dependency >
13
13
<groupId >com.uber</groupId >
14
14
<artifactId >h3</artifactId >
@@ -18,13 +18,13 @@ Add it to your pom.xml:
18
18
19
19
Or, using Gradle:
20
20
21
- ```
21
+ ``` gradle
22
22
compile("com.uber:h3:3.0.0")
23
23
```
24
24
25
25
Encode a location into a hexagon address:
26
26
27
- ```
27
+ ``` java
28
28
H3Core h3 = H3Core . newInstance();
29
29
30
30
double lat = 37.775938728915946 ;
@@ -36,21 +36,21 @@ String hexAddr = h3.geoToH3Address(lat, lng, res);
36
36
37
37
Decode a hexagon address into coordinates:
38
38
39
- ```
39
+ ``` java
40
40
Vector2D [] geoCoords = h3. h3ToGeoBoundary(hexAddr);
41
41
```
42
42
43
43
# Development
44
44
45
45
Building the library requires a JDK, Maven, CMake, and a C compiler. To install to your local Maven cache, run:
46
46
47
- ```
47
+ ``` sh
48
48
mvn install
49
49
```
50
50
51
51
To build the library, run:
52
52
53
- ```
53
+ ``` sh
54
54
mvn package
55
55
```
56
56
@@ -60,7 +60,7 @@ Additional information on how the build process works is available in the [build
60
60
61
61
To build Javadocs documentation:
62
62
63
- ```
63
+ ``` sh
64
64
mvn site
65
65
```
66
66
@@ -70,7 +70,7 @@ Then open the file `target/site/apidocs/index.html`.
70
70
71
71
To run benchmarks, either execute them from IntelliJ or run the following from shell: (Replace the class name as needed)
72
72
73
- ```
73
+ ``` sh
74
74
mvn exec:exec -Dexec.executable=" java" -Dexec.args=" -classpath %classpath com.uber.h3core.benchmarking.H3CoreBenchmark" -Dexec.classpathScope=" test"
75
75
```
76
76
0 commit comments