Java Code Examples for mil.nga.geopackage.tiles.user.TileDao#getMinZoom()

The following examples show how to use mil.nga.geopackage.tiles.user.TileDao#getMinZoom() . These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: osmdroid   File:    License: Apache License 2.0 6 votes vote down vote up
public GeopackageRasterTileSource getTileSource(String database, String table) {
    Iterator<GeoPackage> iterator = geopackage.tileSources.iterator();
    while (iterator.hasNext()){
        GeoPackage next =;
        if (next.getName().equalsIgnoreCase(database)) {
            //found the database
            if (next.getTileTables().contains(table)) {
                //find the tile table
                TileDao tileDao = next.getTileDao(table);
                mil.nga.geopackage.BoundingBox boundingBox = tileDao.getBoundingBox();
                ProjectionTransform transformation = tileDao.getProjection().getTransformation(tileDao.getProjection());
                BoundingBox bounds =new BoundingBox(boundingBox.getMaxLatitude(),boundingBox.getMaxLongitude(),boundingBox.getMinLatitude(),boundingBox.getMinLongitude());
                return new GeopackageRasterTileSource(database,table, (int)tileDao.getMinZoom(),(int)tileDao.getMaxZoom(), bounds);

    return null;
Example 2
Source Project: geopackage-java   File:    License: MIT License 5 votes vote down vote up
 * Build text from a tile table
 * @param table
 *            tile table
 * @return text
public String tileTable(String table) {

	StringBuilder output = new StringBuilder();
	TileDao tileDao = geoPackage.getTileDao(table);
	output.append("Table Name: " + tileDao.getTableName());
	long minZoom = tileDao.getMinZoom();
	long maxZoom = tileDao.getMaxZoom();
	output.append("\nMin Zoom: " + minZoom);
	output.append("\nMax Zoom: " + maxZoom);
	output.append("\nTiles: " + tileDao.count());

	TileMatrixSet tileMatrixSet = tileDao.getTileMatrixSet();


	output.append("\n\nTile Matrix Set\n\n")

	output.append("\n\n Tile Matrices");

	for (long zoom = minZoom; zoom <= maxZoom; zoom++) {
		TileMatrix tileMatrix = tileDao.getTileMatrix(zoom);
		if (tileMatrix != null) {
			output.append("\n\tTiles: " + tileDao.count(zoom));
			BoundingBox boundingBox = tileDao.getBoundingBox(zoom);
			output.append("\n\tTile Bounds: \n")

	return output.toString();