public static int hilbertIndex(Geometry geometry) {
    Coordinate coord = geometry.getCoordinate();
    int x = zigZagEncode((int) Math.round(coord.x * 4096 / 256));
    int y = zigZagEncode((int) Math.round(coord.y * 4096 / 256));
    return Hilbert.hilbertXYToIndex(15, x, y);
  }
Returns the hilbert index of the zig-zag-encoded first point of {@code geometry}.
<p>
This can be useful for sorting geometries to minimize encoded vector tile geometry command size since smaller
offsets take fewer bytes using protobuf varint encoding.
planetiler-core/src/main/java/com/onthegomap/planetiler/VectorTile.java