Start with a GeoPackage with a tile table that doesn't have tiles for every zoom level. In the case of the tests added, denver_tile.gpkg was added to the baseline. It has a set of tiles for zoom 16 only.
Enable scaling in the GeoPackage Tile Retriever:
var gpr = new GeoPackageTileRetriever(tileDao, 256, 256);
gpr.setScaling(tileScalingDao.queryForTableName('tile_table_name'));
With the rules defined, if a zoom level is not found it will search IN first a maximum of 2 zoom levels, if no tiles are found, it will search OUT a maximum of 2 zoom levels. If tiles are found, they will be scaled accordingly to generate the scaled tile.
Added in the Tile Scaling Extension:
http://ngageoint.github.io/GeoPackage/docs/extensions/tile-scaling.html
Added in test cases as well.
Start with a GeoPackage with a tile table that doesn't have tiles for every zoom level. In the case of the tests added, denver_tile.gpkg was added to the baseline. It has a set of tiles for zoom 16 only.
To enable tile scaling extension: const tileScalingExtension = geoPackage.getTileScalingExtension('tile_table_name'); await tileScalingExtension.getOrCreateExtension();
Setup tile scaling constraints: const tileScaling = new TileScaling(); tileScaling.scaling_type = TileScalingType.IN_OUT; tileScaling.zoom_in = 2; tileScaling.zoom_out = 2; tileScalingExtension.createOrUpdate(tileScaling);
Enable scaling in the GeoPackage Tile Retriever: var gpr = new GeoPackageTileRetriever(tileDao, 256, 256); gpr.setScaling(tileScalingDao.queryForTableName('tile_table_name'));
With the rules defined, if a zoom level is not found it will search IN first a maximum of 2 zoom levels, if no tiles are found, it will search OUT a maximum of 2 zoom levels. If tiles are found, they will be scaled accordingly to generate the scaled tile.