Class TileUtilities


  • public class TileUtilities
    extends Object
    An utility class for tile handling.
    Since:
    0.9.7
    Author:
    Andrea Antonello (www.hydrologis.com)
    • Field Detail

      • transparent

        public static final Color transparent
    • Constructor Detail

      • TileUtilities

        public TileUtilities()
    • Method Detail

      • getTileFromDifferentZoomlevel

        public static BufferedImage getTileFromDifferentZoomlevel​(GeopackageCommonDb gpkgDb,
                                                                  String tableName,
                                                                  int x,
                                                                  int y,
                                                                  int zoom,
                                                                  int tileSize,
                                                                  int otherZoomLevel)
                                                           throws Exception
        Produce a geopackage tile for a different zoomlevel applying patching/clipping and scaling.

        This can be used to get a tile for a zoomlevel, in which there are no data.

        Parameters:
        gpkgDb - the database.
        tableName - the name of the table to extract from.
        x - the original tile x.
        y - the original tile y.
        zoom - the original tile zoom level.
        tileSize - the tile size.
        otherZoomLevel - the zoomlevel to extract the new data for.
        Returns:
        the tile image or null if none is available..
        Throws:
        Exception