public static int tmsXYToPosition(int z, int x, int y) {
    int dim = 1 << z;
    return x * dim + (dim - 1 - y);
  }
Return the equivalent tile index using Hilbert ordering on a single level instead of TMS.
planetiler-core/src/main/java/com/onthegomap/planetiler/geo/TileCoord.java