public int [ ] getBoundsInTileIndex ( int zoomlevel ) throws Exception { String sql = "select min(tile_column), max(tile_column), min(tile_row), max(tile_row) from tiles where zoom_level=" + zoomlevel ; return database . execOnConnection ( connection -> { try ( IHMStatement statement = connection . createStatement ( ) ; IHMResultSet resultSet = statement . executeQuery ( sql ) ; ) { if ( resultSet . next ( ) ) { int minTx = resultSet . getInt ( 1 ) ; int maxTx = resultSet . getInt ( 2 ) ; int minTy = resultSet . getInt ( 3 ) ; int maxTy = resultSet . getInt ( 4 ) ; return new int [ ] { minTx , maxTx , minTy , maxTy } ; } } return null ; } ) ; }
Get the bounds of a zoomlevel in tile indexes .