public abstract class BaseTileDownloader extends Object implements Downloader
Modifier and Type | Field and Description |
---|---|
protected byte |
byteNoData |
protected double |
doubleNoData |
protected float |
floatNoData |
protected int |
intNoData |
protected short |
shortNoData |
protected RasterDataStore |
store |
protected int |
tilePxHeight |
protected int |
tilePxWidth |
Constructor and Description |
---|
BaseTileDownloader(RasterDataStore store,
int tilePxWidth,
int tilePxHeight) |
Modifier and Type | Method and Description |
---|---|
protected void |
clearMaskBuffer(Buffer buf,
int nBand)
Sets a band to NODATA value
|
Object[] |
getCrashImage(int w,
int h)
Gets the image that represent a crash tile
|
Object[] |
getDownloadingImage(int w,
int h)
Gets the image that represent a tile while is downloading.
|
int[] |
getTileSize()
Gets the size of a tile in pixels
|
Tile |
readTileFromDisk(Tile tile)
Reads a tile from the tile cache.
|
protected void |
saveTile(Buffer bufResult,
double pixelSize,
String extension,
boolean alphaBand,
Tile tile,
Extent tileExtent,
ColorInterpretation colorInterpretation)
Saves a buffer to disk
|
void |
setNoDataValue(NoData noData)
Sets the nodata value
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
downloadTile
protected int tilePxWidth
protected int tilePxHeight
protected RasterDataStore store
protected byte byteNoData
protected short shortNoData
protected int intNoData
protected float floatNoData
protected double doubleNoData
public BaseTileDownloader(RasterDataStore store, int tilePxWidth, int tilePxHeight)
public Object[] getDownloadingImage(int w, int h)
getDownloadingImage
in interface Downloader
public Object[] getCrashImage(int w, int h)
getCrashImage
in interface Downloader
public int[] getTileSize()
public void setNoDataValue(NoData noData)
noData
- public Tile readTileFromDisk(Tile tile) throws TileGettingException
Downloader
readTileFromDisk
in interface Downloader
TileGettingException
protected void clearMaskBuffer(Buffer buf, int nBand)
bufResult
- tileExtent
- buf
- ex
- pixelSize
- protected void saveTile(Buffer bufResult, double pixelSize, String extension, boolean alphaBand, Tile tile, Extent tileExtent, ColorInterpretation colorInterpretation) throws NotSupportedExtensionException, RasterDriverException, ProcessInterruptedException, IOException
bufResult
- Buffer to savepixelSize
- Pixel sizeextension
- output file formatalphaBand
- true if it has alpha bandpath
- Path to the new filetileExtent
- Bounding box of the tileNotSupportedExtensionException
RasterDriverException
ProcessInterruptedException
IOException