https://github.com/foursquare/h3-presto
Presto bindings for H3, a hierarchical hexagonal geospatial indexing system
https://github.com/foursquare/h3-presto
foursquare h3 hexagon presto spatial-indexing
Last synced: 6 months ago
JSON representation
Presto bindings for H3, a hierarchical hexagonal geospatial indexing system
- Host: GitHub
- URL: https://github.com/foursquare/h3-presto
- Owner: foursquare
- License: apache-2.0
- Created: 2022-10-13T19:59:25.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-03-28T16:59:36.000Z (over 1 year ago)
- Last Synced: 2025-04-02T00:35:33.441Z (7 months ago)
- Topics: foursquare, h3, hexagon, presto, spatial-indexing
- Language: Java
- Homepage:
- Size: 269 KB
- Stars: 7
- Watchers: 35
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# H3-Presto
[](https://github.com/foursquare/h3-presto/actions)
[](https://coveralls.io/github/foursquare/h3-presto?branch=main)
[](LICENSE)
[](https://maven-badges.herokuapp.com/maven-central/com.foursquare.presto/h3-presto)
[](https://github.com/uber/h3/releases/tag/v4.0.1)This library provides Presto bindings for the [H3 Core Library](https://github.com/uber/h3) via a Presto plugin. For API reference, please see the [H3 Documentation](https://h3geo.org/).
# Usage
You will need to [install the plugin](https://prestodb.io/docs/current/develop/spi-overview.html#deploying-a-custom-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.:
```sql
SELECT h3_latlng_to_cell(lat, lng, 9) AS hex FROM my_table;
```# Development
Building the library requires a JDK and Maven. To install to your local Maven cache, run:
```sh
mvn install
```To build the library, run:
```sh
mvn package
```To build the documentation site, run:
```sh
mvn site
```To format source code as required by CI, run:
```sh
mvn com.spotify.fmt:fmt-maven-plugin:format
```## Release
Releasing uses a process along the lines of [h3-java's release process](https://github.com/uber/h3-java/blob/master/docs/releasing.md).
```sh
mvn release:prepare
mvn release:perform
```(As this library does not have native build steps, we plan to automate this in the future.)
# Legal and Licensing
Copyright 2022 Foursquare Labs, Inc. H3-Presto is licensed under the [Apache 2.0 License](./LICENSE).
H3 Copyright 2016 Uber Technologies, Inc.
DGGRID
Copyright (c) 2015 Southern Oregon University