This library provides Presto bindings for the H3 Core Library via a Presto plugin. For API reference, please see the H3 Documentation.
You will need to install the plugin on all nodes of your Presto cluster. For convenience of deployment, the plugin is distributed as a shaded Jar with the dependencies such as H3-Java and Guava packaged in.
Once installed, Presto will automatically load the H3Plugin
at startup and the functions will then be available from SQL, e.g.:
SELECT h3_latlng_to_cell(lat, lng, 9) AS hex FROM my_table;
Building the library requires a JDK and Maven. To install to your local Maven cache, run:
mvn install
To build the library, run:
mvn package
To build the documentation site, run:
mvn site
To format source code as required by CI, run:
mvn com.spotify.fmt:fmt-maven-plugin:format
Releasing uses a process along the lines of h3-java's release process.
mvn release:prepare
mvn release:perform
(As this library does not have native build steps, we plan to automate this in the future.)
Copyright 2022 Foursquare Labs, Inc. H3-Presto is licensed under the Apache 2.0 License.
H3 Copyright 2016 Uber Technologies, Inc.
DGGRID Copyright (c) 2015 Southern Oregon University