public abstract class TileGenerator extends Object
| Modifier and Type | Field and Description |
|---|---|
protected BoundingBox |
boundingBox
Tile bounding box
|
protected Context |
context
Context
|
protected mil.nga.sf.proj.Projection |
projection
Tiles projection
|
| Constructor and Description |
|---|
TileGenerator(Context context,
GeoPackage geoPackage,
String tableName,
int minZoom,
int maxZoom,
BoundingBox boundingBox,
mil.nga.sf.proj.Projection projection)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the GeoPackage
|
protected abstract byte[] |
createTile(int z,
long x,
long y)
Create the tile
|
int |
generateTiles()
Generate the tiles
|
Bitmap.CompressFormat |
getCompressFormat()
Get the compress format
|
Integer |
getCompressQuality()
Get the compress quality
|
GeoPackage |
getGeoPackage()
Get the GeoPackage
|
int |
getMaxZoom()
Get the max zoom
|
int |
getMinZoom()
Get the min zoom
|
GeoPackageProgress |
getProgress()
Get the progress tracker
|
TileScaling |
getScaling()
Get the tile scaling settings
|
String |
getTableName()
Get the table name
|
int |
getTileCount()
Get the tile count of tiles to be generated
|
boolean |
isGoogleTiles()
Is the Google Tiles flag set to generate Google tile format tiles.
|
protected abstract void |
preTileGeneration()
Called after set up and right before tile generation starts for the first
zoom level
|
void |
setBitmapCompressionConfig(Bitmap.Config config)
Set the Bitmap Compress Config
|
void |
setCompressFormat(Bitmap.CompressFormat compressFormat)
Set the compress format
|
void |
setCompressQuality(Integer compressQuality)
Set the compress quality.
|
void |
setGoogleTiles(boolean googleTiles)
Set the Google Tiles flag to true to generate Google tile format tiles.
|
void |
setProgress(GeoPackageProgress progress)
Set the progress tracker
|
void |
setScaling(TileScaling scaling)
Set the tile scaling settings
|
protected final Context context
protected mil.nga.sf.proj.Projection projection
protected BoundingBox boundingBox
public TileGenerator(Context context, GeoPackage geoPackage, String tableName, int minZoom, int maxZoom, BoundingBox boundingBox, mil.nga.sf.proj.Projection projection)
context - app contextgeoPackage - GeoPackagetableName - table nameminZoom - min zoommaxZoom - max zoomboundingBox - tiles bounding boxprojection - tiles projectionpublic GeoPackage getGeoPackage()
public String getTableName()
public int getMinZoom()
public int getMaxZoom()
public void setCompressFormat(Bitmap.CompressFormat compressFormat)
compressFormat - compression formatpublic Bitmap.CompressFormat getCompressFormat()
public void setCompressQuality(Integer compressQuality)
compressQuality - compression qualitypublic Integer getCompressQuality()
public void setProgress(GeoPackageProgress progress)
progress - progress trackerpublic GeoPackageProgress getProgress()
public void setBitmapCompressionConfig(Bitmap.Config config)
config - bitmap configpublic void setGoogleTiles(boolean googleTiles)
googleTiles - Google Tiles flagpublic boolean isGoogleTiles()
public TileScaling getScaling()
public void setScaling(TileScaling scaling)
scaling - tile scalingpublic int getTileCount()
public int generateTiles()
throws SQLException,
IOException
SQLExceptionIOExceptionpublic void close()
protected abstract void preTileGeneration()
protected abstract byte[] createTile(int z,
long x,
long y)
z - x - y -