public abstract class TileGenerator extends Object
| Modifier and Type | Field and Description |
|---|---|
protected BoundingBox |
boundingBox
Tile bounding box
|
protected Context |
context
Context
|
| Constructor and Description |
|---|
TileGenerator(Context context,
GeoPackage geoPackage,
String tableName,
int minZoom,
int maxZoom)
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
|
String |
getTableName()
Get the table name
|
BoundingBox |
getTileBoundingBox()
Get the tile bounding box in WGS84 projection
|
BoundingBox |
getTileBoundingBox(Projection projection)
Get the tile bounding box in specified projection
|
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 |
setTileBoundingBox(BoundingBox boundingBox)
Set the tile bounding box
|
void |
setTileBoundingBox(BoundingBox boundingBox,
Projection projection)
Set the tile bounding box specified in the provided projection
|
protected final Context context
protected BoundingBox boundingBox
public TileGenerator(Context context, GeoPackage geoPackage, String tableName, int minZoom, int maxZoom)
context - geoPackage - tableName - minZoom - maxZoom - public GeoPackage getGeoPackage()
public String getTableName()
public int getMinZoom()
public int getMaxZoom()
public void setTileBoundingBox(BoundingBox boundingBox)
boundingBox - public BoundingBox getTileBoundingBox()
public void setTileBoundingBox(BoundingBox boundingBox, Projection projection)
boundingBox - projection - public BoundingBox getTileBoundingBox(Projection projection)
projection - requested projectionpublic void setCompressFormat(Bitmap.CompressFormat compressFormat)
compressFormat - public Bitmap.CompressFormat getCompressFormat()
public void setCompressQuality(Integer compressQuality)
compressQuality - public Integer getCompressQuality()
public void setProgress(GeoPackageProgress progress)
progress - public GeoPackageProgress getProgress()
public void setBitmapCompressionConfig(Bitmap.Config config)
config - public void setGoogleTiles(boolean googleTiles)
googleTiles - public boolean isGoogleTiles()
public 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 -