// the find
uber/h3-java
Java bindings for H3, a hierarchical hexagonal geospatial indexing system
Java bindings for Uber's H3 hexagonal geospatial indexing library, which lets you encode lat/lng coordinates into hierarchical hexagon cells at 16 resolutions. Useful for spatial aggregation, proximity searches, and geofencing without rolling your own grid math. Target audience is Java/JVM developers doing geospatial work who want H3 without switching to Python or Go.
Ships pre-built native binaries for a wide platform matrix (Linux x64/ARM/PPC/s390x, Windows, Mac ARM, FreeBSD, Android) bundled in the JAR, so you don't need CMake on your deploy machines. GraalVM Native Image config is included, which means it works in Quarkus/Micronaut native builds without manual reflection tweaks. Test coverage is thorough — there's a TestBindingCompleteness that verifies the Java API stays in sync with the native API surface, which catches binding rot early. Tracks the H3 C library closely (currently v4.4.1) with a migration guide from v3.
333 stars for an official Uber library is low, which tells you the Java ecosystem mostly reaches for Python or Go when doing H3 work — you may be on your own when debugging obscure JNI issues. The JNI layer means a segfault in the native code takes down your JVM process, not just throws an exception; error handling in the C wrapper (jniapi.c) is thin. No Kotlin-idiomatic API or extension functions, so Kotlin users get the same Java-style interface with manual null handling. The build requires Docker or a local C toolchain to compile the native layer yourself, which complicates CI for custom platforms.