Class TileWriter


  • public class TileWriter
    extends Object
    Writes the tiles from a GeoPackage tile table to a file system directory To run from command line, build with the standalone profile: mvn clean install -Pstandalone java -classpath geopackage-*-standalone.jar mil.nga.geopackage.io.TileWriter +usage_arguments
    Author:
    osbornb
    • Constructor Detail

      • TileWriter

        public TileWriter()
    • Method Detail

      • main

        public static void main​(String[] args)
                         throws Exception
        Main method to write tiles from a GeoPackage
        Parameters:
        args - arguments
        Throws:
        Exception - upon failure
      • writeTiles

        public static void writeTiles​(File geoPackageFile,
                                      String tileTable,
                                      File directory,
                                      String imageFormat,
                                      Integer width,
                                      Integer height,
                                      TileFormatType tileType,
                                      boolean rawImage)
                               throws IOException
        Write the tile table tile image set within the GeoPackage file to the provided directory
        Parameters:
        geoPackageFile - GeoPackage file
        tileTable - tile table
        directory - output directory
        imageFormat - image format
        width - optional image width
        height - optional image height
        tileType - tile type
        rawImage - use raw image flag
        Throws:
        IOException - upon failure
        Since:
        1.2.0
      • writeTiles

        public static void writeTiles​(GeoPackage geoPackage,
                                      String tileTable,
                                      File directory,
                                      String imageFormat,
                                      Integer width,
                                      Integer height,
                                      TileFormatType tileType,
                                      boolean rawImage)
                               throws IOException
        Write the tile table tile image set within the GeoPackage file to the provided directory
        Parameters:
        geoPackage - open GeoPackage
        tileTable - tile table
        directory - output directory
        imageFormat - image format
        width - optional image width
        height - optional image height
        tileType - tile type
        rawImage - use raw image flag
        Throws:
        IOException - upon failure
        Since:
        1.2.0