public static TileCoord hilbertDecode(int encoded) {
    int z = TileCoord.zoomForIndex(encoded);
    long xy = Hilbert.hilbertPositionToXY(z, encoded - TileCoord.startIndexForZoom(z));
    return TileCoord.ofXYZ(Hilbert.extractX(xy), Hilbert.extractY(xy), z);
  }
Decode an integer using Hilbert ordering on a zoom level back to TMS ordering.
planetiler-core/src/main/java/com/onthegomap/planetiler/geo/TileCoord.java