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