Class TileReprojection

java.lang.Object
mil.nga.geopackage.tiles.reproject.TileReprojectionCore
mil.nga.geopackage.tiles.reproject.TileReprojection

public class TileReprojection extends TileReprojectionCore
Tile Reprojection for reprojecting an existing tile table
Since:
5.0.0
  • Constructor Details

    • TileReprojection

      public TileReprojection(TileDao tileDao, GeoPackage geoPackage, String table, Projection projection)
      Constructor, reproject a tile table to a new tile table in a specified GeoPackage
      Parameters:
      tileDao - tile DAO
      geoPackage - GeoPackage for reprojected tile table
      table - new reprojected tile table
      projection - desired projection
    • TileReprojection

      public TileReprojection(TileDao tileDao, TileDao reprojectTileDao)
      Constructor, reproject a GeoPackage tile table to a new tile table
      Parameters:
      tileDao - tile DAO
      reprojectTileDao - reprojection tile DAO
    • TileReprojection

      public TileReprojection(TileDao tileDao, GeoPackage geoPackage, TileDao reprojectTileDao)
      Constructor, reproject a GeoPackage tile table to a new tile table
      Parameters:
      tileDao - tile DAO
      geoPackage - GeoPackage for reprojected tile table
      reprojectTileDao - reprojection tile DAO
  • Method Details

    • create

      public static TileReprojection create(GeoPackage geoPackage, String table, Projection projection)
      Create a Reprojection from a GeoPackage tile table, replacing the existing tiles
      Parameters:
      geoPackage - GeoPackage
      table - tile table
      projection - desired projection
      Returns:
      tile reprojection
    • create

      public static TileReprojection create(GeoPackage geoPackage, String table, String reprojectTable, Projection projection)
      Create a Reprojection from a GeoPackage tile table to a new tile table within the GeoPackage
      Parameters:
      geoPackage - GeoPackage
      table - tile table
      reprojectTable - new reprojected tile table
      projection - desired projection
      Returns:
      tile reprojection
    • create

      public static TileReprojection create(GeoPackage geoPackage, String table, GeoPackage reprojectGeoPackage, String reprojectTable, Projection projection)
      Create a Reprojection from a GeoPackage tile table to a new tile table in a specified GeoPackage
      Parameters:
      geoPackage - GeoPackage
      table - tile table
      reprojectGeoPackage - GeoPackage for reprojected tile table
      reprojectTable - new reprojected tile table
      projection - desired projection
      Returns:
      tile reprojection
    • create

      public static TileReprojection create(TileDao tileDao, GeoPackage geoPackage, String reprojectTable, Projection projection)
      Create a Reprojection from a tile table to a new tile table in a specified GeoPackage
      Parameters:
      tileDao - tile DAO
      geoPackage - GeoPackage for reprojected tile table
      reprojectTable - new reprojected tile table
      projection - desired projection
      Returns:
      tile reprojection
    • create

      public static TileReprojection create(GeoPackage geoPackage, String table, TileDao reprojectTileDao)
      Create a Reprojection from a GeoPackage tile table to a new tile table
      Parameters:
      geoPackage - GeoPackage
      table - tile table
      reprojectTileDao - reprojection tile DAO
      Returns:
      tile reprojection
    • create

      public static TileReprojection create(TileDao tileDao, TileDao reprojectTileDao)
      Create a Reprojection from a GeoPackage tile table to a new tile table
      Parameters:
      tileDao - tile DAO
      reprojectTileDao - reprojection tile DAO
      Returns:
      tile reprojection
    • create

      public static TileReprojection create(GeoPackage geoPackage, String table, GeoPackage reprojectGeoPackage, TileDao reprojectTileDao)
      Create a Reprojection from a GeoPackage tile table to a new tile table
      Parameters:
      geoPackage - GeoPackage
      table - tile table
      reprojectGeoPackage - GeoPackage for reprojected tile table
      reprojectTileDao - reprojection tile DAO
      Returns:
      tile reprojection
    • create

      public static TileReprojection create(TileDao tileDao, GeoPackage reprojectGeoPackage, TileDao reprojectTileDao)
      Create a Reprojection from a GeoPackage tile table to a new tile table
      Parameters:
      tileDao - tile DAO
      reprojectGeoPackage - GeoPackage for reprojected tile table
      reprojectTileDao - reprojection tile DAO
      Returns:
      tile reprojection
    • create

      public static TileReprojection create(GeoPackage geoPackage, String table, TileReprojectionOptimize optimize)
      Create a Reprojection from a GeoPackage tile table, replacing the existing tiles
      Parameters:
      geoPackage - GeoPackage
      table - tile table
      optimize - desired optimization
      Returns:
      tile reprojection
    • create

      public static TileReprojection create(GeoPackage geoPackage, String table, String reprojectTable, TileReprojectionOptimize optimize)
      Create a Reprojection from a GeoPackage tile table to a new tile table within the GeoPackage
      Parameters:
      geoPackage - GeoPackage
      table - tile table
      reprojectTable - new reprojected tile table
      optimize - desired optimization
      Returns:
      tile reprojection
    • create

      public static TileReprojection create(GeoPackage geoPackage, String table, GeoPackage reprojectGeoPackage, String reprojectTable, TileReprojectionOptimize optimize)
      Create a Reprojection from a GeoPackage tile table to a new tile table in a specified GeoPackage
      Parameters:
      geoPackage - GeoPackage
      table - tile table
      reprojectGeoPackage - GeoPackage for reprojected tile table
      reprojectTable - new reprojected tile table
      optimize - desired optimization
      Returns:
      tile reprojection
    • create

      public static TileReprojection create(TileDao tileDao, GeoPackage reprojectGeoPackage, String reprojectTable, TileReprojectionOptimize optimize)
      Create a Reprojection from a tile table to a new tile table in a specified GeoPackage
      Parameters:
      tileDao - tile DAO
      reprojectGeoPackage - GeoPackage for reprojected tile table
      reprojectTable - new reprojected tile table
      optimize - desired optimization
      Returns:
      tile reprojection
    • reproject

      public static int reproject(GeoPackage geoPackage, String table, Projection projection)
      Reproject a GeoPackage tile table, replacing the existing tiles
      Parameters:
      geoPackage - GeoPackage
      table - tile table
      projection - desired projection
      Returns:
      created tiles
    • reproject

      public static int reproject(GeoPackage geoPackage, String table, String reprojectTable, Projection projection)
      Reproject a GeoPackage tile table to a new tile table within the GeoPackage
      Parameters:
      geoPackage - GeoPackage
      table - tile table
      reprojectTable - new reprojected tile table
      projection - desired projection
      Returns:
      created tiles
    • reproject

      public static int reproject(GeoPackage geoPackage, String table, GeoPackage reprojectGeoPackage, String reprojectTable, Projection projection)
      Reproject a GeoPackage tile table to a new tile table in a specified GeoPackage
      Parameters:
      geoPackage - GeoPackage
      table - tile table
      reprojectGeoPackage - GeoPackage for reprojected tile table
      reprojectTable - new reprojected tile table
      projection - desired projection
      Returns:
      created tiles
    • reproject

      public static int reproject(TileDao tileDao, GeoPackage reprojectGeoPackage, String reprojectTable, Projection projection)
      Reproject a tile table to a new tile table in a specified GeoPackage
      Parameters:
      tileDao - tile DAO
      reprojectGeoPackage - GeoPackage for reprojected tile table
      reprojectTable - new reprojected tile table
      projection - desired projection
      Returns:
      created tiles
    • reproject

      public static int reproject(GeoPackage geoPackage, String table, TileDao reprojectTileDao)
      Reproject a GeoPackage tile table to a new tile table
      Parameters:
      geoPackage - GeoPackage
      table - tile table
      reprojectTileDao - reprojection tile DAO
      Returns:
      created tiles
    • reproject

      public static int reproject(TileDao tileDao, TileDao reprojectTileDao)
      Reproject a GeoPackage tile table to a new tile table
      Parameters:
      tileDao - tile DAO
      reprojectTileDao - reprojection tile DAO
      Returns:
      created tiles
    • reproject

      public static int reproject(GeoPackage geoPackage, String table, GeoPackage reprojectGeoPackage, TileDao reprojectTileDao)
      Reproject a GeoPackage tile table to a new tile table
      Parameters:
      geoPackage - GeoPackage
      table - tile table
      reprojectGeoPackage - GeoPackage for reprojected tile table
      reprojectTileDao - reprojection tile DAO
      Returns:
      created tiles
    • reproject

      public static int reproject(TileDao tileDao, GeoPackage reprojectGeoPackage, TileDao reprojectTileDao)
      Reproject a GeoPackage tile table to a new tile table
      Parameters:
      tileDao - tile DAO
      reprojectGeoPackage - GeoPackage for reprojected tile table
      reprojectTileDao - reprojection tile DAO
      Returns:
      created tiles
    • reproject

      public static int reproject(GeoPackage geoPackage, String table, TileReprojectionOptimize optimize)
      Reproject a GeoPackage tile table, replacing the existing tiles
      Parameters:
      geoPackage - GeoPackage
      table - tile table
      optimize - desired optimization
      Returns:
      created tiles
    • reproject

      public static int reproject(GeoPackage geoPackage, String table, String reprojectTable, TileReprojectionOptimize optimize)
      Reproject a GeoPackage tile table to a new tile table within the GeoPackage
      Parameters:
      geoPackage - GeoPackage
      table - tile table
      reprojectTable - new reprojected tile table
      optimize - desired optimization
      Returns:
      created tiles
    • reproject

      public static int reproject(GeoPackage geoPackage, String table, GeoPackage reprojectGeoPackage, String reprojectTable, TileReprojectionOptimize optimize)
      Reproject a GeoPackage tile table to a new tile table in a specified GeoPackage
      Parameters:
      geoPackage - GeoPackage
      table - tile table
      reprojectGeoPackage - GeoPackage for reprojected tile table
      reprojectTable - new reprojected tile table
      optimize - desired optimization
      Returns:
      created tiles
    • reproject

      public static int reproject(TileDao tileDao, GeoPackage reprojectGeoPackage, String reprojectTable, TileReprojectionOptimize optimize)
      Reproject a tile table to a new tile table in a specified GeoPackage
      Parameters:
      tileDao - tile DAO
      reprojectGeoPackage - GeoPackage for reprojected tile table
      reprojectTable - new reprojected tile table
      optimize - desired optimization
      Returns:
      created tiles
    • getTileDao

      public TileDao getTileDao()
      Get the tile DAO
      Returns:
      tile DAO
    • getGeoPackage

      public GeoPackage getGeoPackage()
      Get the GeoPackage
      Returns:
      GeoPackage
    • getReprojectTileDao

      public TileDao getReprojectTileDao()
      Get the reprojection tile DAO
      Returns:
      reprojection tile DAO
    • getOptimizeZoom

      protected long getOptimizeZoom()
      Specified by:
      getOptimizeZoom in class TileReprojectionCore
    • createReprojectTileDao

      protected TileDao createReprojectTileDao(String table)
      Specified by:
      createReprojectTileDao in class TileReprojectionCore
    • getTileDao

      public TileDao getTileDao(boolean reproject)
      Get the corresponding tile dao
      Parameters:
      reproject - true for reprojection
      Returns:
      tile dao
    • getTileMatrixSet

      protected TileMatrixSet getTileMatrixSet(boolean reproject)
      Specified by:
      getTileMatrixSet in class TileReprojectionCore
    • getTileMatrices

      protected List<TileMatrix> getTileMatrices(boolean reproject)
      Specified by:
      getTileMatrices in class TileReprojectionCore
    • getTileMatrix

      protected TileMatrix getTileMatrix(boolean reproject, long zoom)
      Specified by:
      getTileMatrix in class TileReprojectionCore
    • deleteTileMatrices

      protected void deleteTileMatrices(boolean reproject, String table)
      Specified by:
      deleteTileMatrices in class TileReprojectionCore
    • getMapZoom

      protected long getMapZoom(boolean reproject, TileMatrix tileMatrix)
      Specified by:
      getMapZoom in class TileReprojectionCore
    • createTileMatrix

      protected void createTileMatrix(TileMatrix tileMatrix)
      Specified by:
      createTileMatrix in class TileReprojectionCore
    • reproject

      protected int reproject(long zoom, long toZoom, BoundingBox boundingBox, long matrixWidth, long matrixHeight, long tileWidth, long tileHeight)
      Specified by:
      reproject in class TileReprojectionCore