private static int zoomForIndex(int idx) {
    for (int z = MAX_MAXZOOM; z >= 0; z--) {
      if (ZOOM_START_INDEX[z] <= idx) {
        return z;
      }
    }
    throw new IllegalArgumentException("Bad index: " + idx);
  }
The coordinate of a <a href="https://wiki.openstreetmap.org/wiki/Slippy_map_tilenames">slippy map tile</a>.
<p>
Tile coords are sorted by consecutive Z levels in ascending order: 0 coords for z=0, 4 coords for z=1, etc. The
default is TMS order: a level is sorted by x ascending, y descending to match the ordering of the MBTiles sqlite
index.
<p>

@param encoded the tile ID encoded as a 32-bit integer
@param x       x coordinate of the tile where 0 is the western-most tile just to the east the international date line
               and 2^z-1 is the eastern-most tile
@param y       y coordinate of the tile where 0 is the northern-most tile and 2^z-1 is the southern-most tile
@param z       zoom level ({@code <= 15})
planetiler-core/src/main/java/com/onthegomap/planetiler/geo/TileCoord.java