Package mil.nga.geopackage.tiles
Class UrlTileGenerator
- java.lang.Object
-
- mil.nga.geopackage.tiles.TileGenerator
-
- mil.nga.geopackage.tiles.UrlTileGenerator
-
public class UrlTileGenerator extends TileGenerator
Creates a set of tiles within a GeoPackage by downloading the tiles from a URL
-
-
Field Summary
-
Fields inherited from class mil.nga.geopackage.tiles.TileGenerator
boundingBox, context, projection
-
-
Constructor Summary
Constructors Constructor Description UrlTileGenerator(Context context, GeoPackage geoPackage, String tableName, String tileUrl, int minZoom, int maxZoom, BoundingBox boundingBox, Projection projection)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected byte[]createTile(int z, long x, long y)Create the tilebooleanisTms()Is TMS URLprotected voidpreTileGeneration()Called after set up and right before tile generation starts for the first zoom levelvoidsetTms(boolean tms)Set the TMS URL flag-
Methods inherited from class mil.nga.geopackage.tiles.TileGenerator
close, generateTiles, getBoundingBox, getBoundingBox, getCompressFormat, getCompressQuality, getGeoPackage, getMaxZoom, getMinZoom, getProgress, getScaling, getTableName, getTileCount, isSkipExisting, isXYZTiles, setBitmapCompressionConfig, setCompressFormat, setCompressQuality, setProgress, setScaling, setSkipExisting, setXYZTiles
-
-
-
-
Constructor Detail
-
UrlTileGenerator
public UrlTileGenerator(Context context, GeoPackage geoPackage, String tableName, String tileUrl, int minZoom, int maxZoom, BoundingBox boundingBox, Projection projection)
Constructor- Parameters:
context- app contextgeoPackage- GeoPackagetableName- table nametileUrl- tile urlminZoom- min zoommaxZoom- max zoomboundingBox- tiles bounding boxprojection- tiles projection- Since:
- 1.3.0
-
-
Method Detail
-
isTms
public boolean isTms()
Is TMS URL- Returns:
- true if TMS URL
- Since:
- 1.2.1
-
setTms
public void setTms(boolean tms)
Set the TMS URL flag- Parameters:
tms- true if a TMS URL- Since:
- 1.2.1
-
preTileGeneration
protected void preTileGeneration()
Called after set up and right before tile generation starts for the first zoom level- Specified by:
preTileGenerationin classTileGenerator
-
createTile
protected byte[] createTile(int z, long x, long y)Create the tile- Specified by:
createTilein classTileGenerator- Parameters:
z- zoom levelx- x coordinatey- y coordinate- Returns:
- tile bytes
-
-