Class TileReprojectionCore
- java.lang.Object
- 
- mil.nga.geopackage.tiles.reproject.TileReprojectionCore
 
- 
 public abstract class TileReprojectionCore extends Object Tile Reprojection for reprojecting an existing tile table- Since:
- 5.0.0
- Author:
- osbornb
 
- 
- 
Field SummaryFields Modifier and Type Field Description protected GeoPackageCoregeoPackageGeoPackageprotected TileReprojectionOptimizeoptimizeOptional optimizationprotected TileGridoptimizeTileGridOptimization tile gridprotected longoptimizeZoomOptimization zoomprotected booleanoverwriteOverwrite existing tiles at a zoom level when geographic calculations differprotected GeoPackageProgressprogressProgress callbacksprotected ProjectionprojectionProjectionprotected booleanreplaceReplace flagprotected UserCoreDao<TileColumn,TileTable,?,?>reprojectTileDaoTile DAOprotected StringtableTable nameprotected UserCoreDao<TileColumn,TileTable,?,?>tileDaoTile DAOprotected LongtileHeightTile height in pixelsprotected LongtileWidthTile width in pixelsprotected Map<Long,TileReprojectionZoom>zoomConfigsZoom level configuration map
 - 
Constructor SummaryConstructors Modifier Constructor Description protectedTileReprojectionCore(UserCoreDao<TileColumn,TileTable,?,?> tileDao, GeoPackageCore geoPackage, String table, Projection projection)ConstructorprotectedTileReprojectionCore(UserCoreDao<TileColumn,TileTable,?,?> tileDao, GeoPackageCore geoPackage, UserCoreDao<TileColumn,TileTable,?,?> reprojectTileDao)ConstructorprotectedTileReprojectionCore(UserCoreDao<TileColumn,TileTable,?,?> tileDao, UserCoreDao<TileColumn,TileTable,?,?> reprojectTileDao)Constructor
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract UserCoreDao<TileColumn,TileTable,?,?>createReprojectTileDao(String table)Create the reprojection tile DAOprotected abstract voidcreateTileMatrix(TileMatrix tileMatrix)Create the tile matrixprotected abstract voiddeleteTileMatrices(boolean reproject, String table)Delete the table tile matricesprotected voidfinish()Finish the reprojectionTileReprojectionZoomgetConfig(long zoom)Get the zoom level configuration for a zoom levelTileReprojectionZoomgetConfigOrCreate(long zoom)Get the zoom level configuration or create new configuration for a zoom levelprotected abstract longgetMapZoom(boolean reproject, TileMatrix tileMatrix)Get the map zoom of the tile matrixLonggetMatrixHeight(long zoom)Get a reprojected matrix height from a zoom levelLonggetMatrixWidth(long zoom)Get a reprojected matrix width from a zoom levelTileReprojectionOptimizegetOptimize()Get the optimizationprotected abstract longgetOptimizeZoom()Get the optimization minimum zoom levelGeoPackageProgressgetProgress()Get the progress callbacksLonggetTileHeight()Get the tile heightLonggetTileHeight(long zoom)Get a reprojected tile height from a zoom levelprotected abstract List<TileMatrix>getTileMatrices(boolean reproject)Get the tile matricesprotected abstract TileMatrixgetTileMatrix(boolean reproject, long zoom)Get the tile matrixprotected abstract TileMatrixSetgetTileMatrixSet(boolean reproject)Get the tile matrix setLonggetTileWidth()Get the tile widthLonggetTileWidth(long zoom)Get a reprojected tile width from a zoom levellonggetToZoom(long zoom)Get a reprojected to zoom level from a zoom level, defaults as the zoom level if not setMap<Long,TileReprojectionZoom>getZoomConfigs()Get the zoom level configurationsprotected voidinitialize()Initialize the reprojectionprotected booleanisActive()Check if currently activebooleanisOverwrite()Is overwrite enabledprotected BoundingBoxoptimize(BoundingBox boundingBox)Optimize the bounding boxintreproject()Reproject the tile tableintreproject(long zoom)Reproject the tile table for the zoom levelintreproject(long minZoom, long maxZoom)Reproject the tile table within the zoom rangeprotected abstract intreproject(long zoom, long toZoom, BoundingBox boundingBox, long matrixWidth, long matrixHeight, long tileWidth, long tileHeight)Reproject the tilesintreproject(List<Long> zooms)Reproject the tile table for the zoom levels, ordered numerically lowest to highestvoidsetConfig(TileReprojectionZoom config)Set a zoom level configuration for a zoom levelvoidsetMatrixHeight(long zoom, long matrixHeight)Set a reprojected matrix height for a zoom levelvoidsetMatrixWidth(long zoom, long matrixWidth)Set a reprojected matrix width for a zoom levelvoidsetOptimize(TileReprojectionOptimize optimize)Set the optimizationvoidsetOverwrite(boolean overwrite)Set the overwrite flagvoidsetProgress(GeoPackageProgress progress)Set the progress callbacksvoidsetTileHeight(long zoom, long tileHeight)Set a reprojected tile height for a zoom levelvoidsetTileHeight(Long tileHeight)Set the tile heightvoidsetTileWidth(long zoom, long tileWidth)Set a reprojected tile width for a zoom levelvoidsetTileWidth(Long tileWidth)Set the tile widthvoidsetToZoom(long zoom, long toZoom)Set a reprojected to zoom level for a zoom level
 
- 
- 
- 
Field Detail- 
optimizeprotected TileReprojectionOptimize optimize Optional optimization
 - 
overwriteprotected boolean overwrite Overwrite existing tiles at a zoom level when geographic calculations differ
 - 
tileWidthprotected Long tileWidth Tile width in pixels
 - 
tileHeightprotected Long tileHeight Tile height in pixels
 - 
progressprotected GeoPackageProgress progress Progress callbacks
 - 
tileDaoprotected UserCoreDao<TileColumn,TileTable,?,?> tileDao Tile DAO
 - 
geoPackageprotected GeoPackageCore geoPackage GeoPackage
 - 
tableprotected String table Table name
 - 
projectionprotected Projection projection Projection
 - 
reprojectTileDaoprotected UserCoreDao<TileColumn,TileTable,?,?> reprojectTileDao Tile DAO
 - 
replaceprotected boolean replace Replace flag
 - 
zoomConfigsprotected Map<Long,TileReprojectionZoom> zoomConfigs Zoom level configuration map
 - 
optimizeTileGridprotected TileGrid optimizeTileGrid Optimization tile grid
 - 
optimizeZoomprotected long optimizeZoom Optimization zoom
 
- 
 - 
Constructor Detail- 
TileReprojectionCoreprotected TileReprojectionCore(UserCoreDao<TileColumn,TileTable,?,?> tileDao, GeoPackageCore geoPackage, String table, Projection projection) Constructor- Parameters:
- tileDao- tile DAO
- geoPackage- GeoPackage
- table- table name
- projection- projection
 
 - 
TileReprojectionCoreprotected TileReprojectionCore(UserCoreDao<TileColumn,TileTable,?,?> tileDao, UserCoreDao<TileColumn,TileTable,?,?> reprojectTileDao) Constructor- Parameters:
- tileDao- tile DAO
- reprojectTileDao- reprojection tile DAO
 
 - 
TileReprojectionCoreprotected TileReprojectionCore(UserCoreDao<TileColumn,TileTable,?,?> tileDao, GeoPackageCore geoPackage, UserCoreDao<TileColumn,TileTable,?,?> reprojectTileDao) Constructor- Parameters:
- tileDao- tile DAO
- geoPackage- GeoPackage
- reprojectTileDao- reprojection tile DAO
 
 
- 
 - 
Method Detail- 
getOptimizeZoomprotected abstract long getOptimizeZoom() Get the optimization minimum zoom level- Returns:
- zoom level
 
 - 
createReprojectTileDaoprotected abstract UserCoreDao<TileColumn,TileTable,?,?> createReprojectTileDao(String table) Create the reprojection tile DAO- Parameters:
- table- table name
- Returns:
- reprojection tile DAO
 
 - 
getTileMatrixSetprotected abstract TileMatrixSet getTileMatrixSet(boolean reproject) Get the tile matrix set- Parameters:
- reproject- true for reprojection tile dao
- Returns:
- tile matrix set
 
 - 
getTileMatricesprotected abstract List<TileMatrix> getTileMatrices(boolean reproject) Get the tile matrices- Parameters:
- reproject- true for reprojection tile dao
- Returns:
- tile matrix matrices
 
 - 
getTileMatrixprotected abstract TileMatrix getTileMatrix(boolean reproject, long zoom) Get the tile matrix- Parameters:
- reproject- true for reprojection tile dao
- zoom- zoom level
- Returns:
- tile matrix
 
 - 
deleteTileMatricesprotected abstract void deleteTileMatrices(boolean reproject, String table)Delete the table tile matrices- Parameters:
- reproject- true for reprojection tile dao
- table- table name
 
 - 
getMapZoomprotected abstract long getMapZoom(boolean reproject, TileMatrix tileMatrix)Get the map zoom of the tile matrix- Parameters:
- reproject- true for reprojection tile dao
- tileMatrix- tile matrix
- Returns:
- map zoom level
 
 - 
createTileMatrixprotected abstract void createTileMatrix(TileMatrix tileMatrix) Create the tile matrix- Parameters:
- tileMatrix- tile matrix
 
 - 
reprojectprotected abstract int reproject(long zoom, long toZoom, BoundingBox boundingBox, long matrixWidth, long matrixHeight, long tileWidth, long tileHeight)Reproject the tiles- Parameters:
- zoom- zoom level
- toZoom- reprojection zoom level
- boundingBox- bounding box
- matrixWidth- matrix width
- matrixHeight- matrix height
- tileWidth- tile width
- tileHeight- tile height
- Returns:
- reprojected tiles
 
 - 
getOptimizepublic TileReprojectionOptimize getOptimize() Get the optimization- Returns:
- optimization
 
 - 
setOptimizepublic void setOptimize(TileReprojectionOptimize optimize) Set the optimization- Parameters:
- optimize- optimization
 
 - 
isOverwritepublic boolean isOverwrite() Is overwrite enabled- Returns:
- overwrite flag
 
 - 
setOverwritepublic void setOverwrite(boolean overwrite) Set the overwrite flag- Parameters:
- overwrite- overwrite flag
 
 - 
getTileWidthpublic Long getTileWidth() Get the tile width- Returns:
- tile width
 
 - 
setTileWidthpublic void setTileWidth(Long tileWidth) Set the tile width- Parameters:
- tileWidth- tile width
 
 - 
getTileHeightpublic Long getTileHeight() Get the tile height- Returns:
- tile height
 
 - 
setTileHeightpublic void setTileHeight(Long tileHeight) Set the tile height- Parameters:
- tileHeight- tile height
 
 - 
getProgresspublic GeoPackageProgress getProgress() Get the progress callbacks- Returns:
- progress
 
 - 
setProgresspublic void setProgress(GeoPackageProgress progress) Set the progress callbacks- Parameters:
- progress- progress callbacks
 
 - 
getZoomConfigspublic Map<Long,TileReprojectionZoom> getZoomConfigs() Get the zoom level configurations- Returns:
- zoom configs
 
 - 
getConfigpublic TileReprojectionZoom getConfig(long zoom) Get the zoom level configuration for a zoom level- Parameters:
- zoom- from zoom level
- Returns:
- zoom config
 
 - 
getConfigOrCreatepublic TileReprojectionZoom getConfigOrCreate(long zoom) Get the zoom level configuration or create new configuration for a zoom level- Parameters:
- zoom- from zoom level
- Returns:
- zoom config
 
 - 
setConfigpublic void setConfig(TileReprojectionZoom config) Set a zoom level configuration for a zoom level- Parameters:
- config- zoom configuration
 
 - 
setToZoompublic void setToZoom(long zoom, long toZoom)Set a reprojected to zoom level for a zoom level- Parameters:
- zoom- zoom level
- toZoom- reprojected zoom level
 
 - 
getToZoompublic long getToZoom(long zoom) Get a reprojected to zoom level from a zoom level, defaults as the zoom level if not set- Parameters:
- zoom- zoom level
- Returns:
- reprojected to zoom level
 
 - 
setTileWidthpublic void setTileWidth(long zoom, long tileWidth)Set a reprojected tile width for a zoom level- Parameters:
- tileWidth- reprojected tile width
- zoom- zoom level
 
 - 
getTileWidthpublic Long getTileWidth(long zoom) Get a reprojected tile width from a zoom level- Parameters:
- zoom- zoom level
- Returns:
- reprojected tile width
 
 - 
setTileHeightpublic void setTileHeight(long zoom, long tileHeight)Set a reprojected tile height for a zoom level- Parameters:
- zoom- zoom level
- tileHeight- reprojected tile height
 
 - 
getTileHeightpublic Long getTileHeight(long zoom) Get a reprojected tile height from a zoom level- Parameters:
- zoom- zoom level
- Returns:
- reprojected tile height
 
 - 
setMatrixWidthpublic void setMatrixWidth(long zoom, long matrixWidth)Set a reprojected matrix width for a zoom level- Parameters:
- matrixWidth- reprojected matrix width
- zoom- zoom level
 
 - 
getMatrixWidthpublic Long getMatrixWidth(long zoom) Get a reprojected matrix width from a zoom level- Parameters:
- zoom- zoom level
- Returns:
- reprojected matrix width
 
 - 
setMatrixHeightpublic void setMatrixHeight(long zoom, long matrixHeight)Set a reprojected matrix height for a zoom level- Parameters:
- matrixHeight- reprojected matrix height
- zoom- zoom level
 
 - 
getMatrixHeightpublic Long getMatrixHeight(long zoom) Get a reprojected matrix height from a zoom level- Parameters:
- zoom- zoom level
- Returns:
- reprojected matrix height
 
 - 
initializeprotected void initialize() Initialize the reprojection
 - 
finishprotected void finish() Finish the reprojection
 - 
reprojectpublic int reproject() Reproject the tile table- Returns:
- created tiles
 
 - 
reprojectpublic int reproject(long minZoom, long maxZoom)Reproject the tile table within the zoom range- Parameters:
- minZoom- min zoom
- maxZoom- max zoom
- Returns:
- created tiles
 
 - 
reprojectpublic int reproject(List<Long> zooms) Reproject the tile table for the zoom levels, ordered numerically lowest to highest- Parameters:
- zooms- zoom levels, ordered lowest to highest
- Returns:
- created tiles
 
 - 
reprojectpublic int reproject(long zoom) Reproject the tile table for the zoom level- Parameters:
- zoom- zoom level
- Returns:
- created tiles
 
 - 
optimizeprotected BoundingBox optimize(BoundingBox boundingBox) Optimize the bounding box- Parameters:
- boundingBox- bounding box
- Returns:
- optimized bounding box
 
 - 
isActiveprotected boolean isActive() Check if currently active- Returns:
- true if active
 
 
- 
 
-