### Question:
Tile { public static Tile fromLonLat(double lon, double lat, int z) { int x = (int) ((lon + 180.0) / 360.0 * (1 << z)); int y = (int) ((1 - Math.log(Math.tan(Math.toRadians(lat)) + 1 / Math.cos(Math.toRadians(lat))) / Math.PI) / 2.0 * (1 << z)); return new Tile(x, y, z); } Tile(int x, int y, int z); long index(); int x(); int y(); int z(); Tile parent(); List<Tile> children(); Envelope envelope(); @Override boolean equals(Object o); @Override int hashCode(); static double tile2lon(int x, int z); static double tile2lat(int y, int z); @Override String toString(); static long countTiles(Envelope envelope, int minZ, int maxZ); static long countTiles(Envelope envelope, int z); static Stream<Tile> getTiles(Envelope envelope, int minZ, int maxZ); static Stream<Tile> getTiles(Envelope envelope, int z); static Tile fromLonLat(double lon, double lat, int z); static Tile fromIndex(Long value);  }### Answer:
@Test void getTile() { double lon = 1062451.988597151, lat = 5965417.348546229; int z = 14; Tile tile = Tile.fromLonLat(lon, lat, 14); int y = (int) ((1 - Math.log(Math.tan(Math.toRadians(lat)) + 1 / Math.cos(Math.toRadians(lat))) / Math.PI) / 2.0 * (1 << z)); }