public class BasicElevationModelBulkDownloader extends BulkRetrievalThread
Modifier and Type | Class and Description |
---|---|
protected class |
BasicElevationModelBulkDownloader.BulkDownloadPostProcessor |
Thread.State, Thread.UncaughtExceptionHandler
Modifier and Type | Field and Description |
---|---|
protected static long |
DEFAULT_AVERAGE_FILE_SIZE |
protected BasicElevationModel |
elevationModel |
protected int |
level |
protected static int |
MAX_TILE_COUNT_PER_REGION |
protected ArrayList<Tile> |
missingTiles |
fileStore, progress, resolution, retrievable, RETRIEVAL_SERVICE_POLL_DELAY, retrievalListeners, sector
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Constructor and Description |
---|
BasicElevationModelBulkDownloader(BasicElevationModel elevationModel,
Sector sector,
double resolution,
BulkRetrievalListener listener)
Constructs a downloader to retrieve elevations not currently available in the World Wind file cache.
|
BasicElevationModelBulkDownloader(BasicElevationModel elevationModel,
Sector sector,
double resolution,
FileStore fileStore,
BulkRetrievalListener listener)
Constructs a downloader to retrieve elevations not currently available in a specified file store.
|
Modifier and Type | Method and Description |
---|---|
protected void |
callRetrievalListeners(Retriever retriever,
Tile tile) |
protected static long |
computeAverageTileSize(File dir) |
protected int |
computeLevelForResolution(Sector sector,
double resolution) |
protected Sector[] |
computeRandomRegions(Sector sector,
int div,
int numRegions) |
protected int |
computeRegionDivisions(Sector sector,
int levelNumber,
int maxCount) |
protected long |
countTilesInSector(Sector sector,
int levelNumber) |
protected long |
estimateAverageTileSize() |
protected long |
estimateMissingTilesCount(int numSamples) |
protected long |
getEstimatedMissingDataSize() |
protected ArrayList<Tile> |
getMissingTilesInSector(Sector sector,
int levelNumber) |
protected Iterator<Sector> |
getRegionIterator(Sector sector,
int div) |
protected Tile[][] |
getTilesInSector(Sector sector,
int levelNumber) |
protected boolean |
isTileLocalOrAbsent(Tile tile) |
protected void |
normalizeProgress() |
protected void |
removeAbsentTile(Tile tile) |
protected void |
removeRetrievedTile(Tile tile) |
void |
run() |
protected void |
submitMissingTilesRequests() |
addRetrievalListener, callRetrievalListeners, getFileStore, getProgress, getResolution, getRetrievable, getSector, hasRetrievalListeners, removeRetrievalListener
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
protected static final long DEFAULT_AVERAGE_FILE_SIZE
protected final BasicElevationModel elevationModel
protected final int level
protected static final int MAX_TILE_COUNT_PER_REGION
public BasicElevationModelBulkDownloader(BasicElevationModel elevationModel, Sector sector, double resolution, BulkRetrievalListener listener)
elevationModel
- the elevation model for which to download elevations.sector
- the sector to download data for. This value is final.resolution
- the target resolution, provided in radians of latitude per texel. This value is final.listener
- an optional retrieval listener. May be null.IllegalArgumentException
- if either the elevation model or sector are null, or the resolution is less than
zero.public BasicElevationModelBulkDownloader(BasicElevationModel elevationModel, Sector sector, double resolution, FileStore fileStore, BulkRetrievalListener listener)
elevationModel
- the elevation model for which to download elevations.sector
- the sector to download data for. This value is final.resolution
- the target resolution, provided in radians of latitude per texel. This value is final.fileStore
- the file store in which to place the downloaded elevations.listener
- an optional retrieval listener. May be null.IllegalArgumentException
- if either the elevation model, the sector or file store are null, or the
resolution is less than zero.protected static long computeAverageTileSize(File dir)
protected int computeLevelForResolution(Sector sector, double resolution)
protected Sector[] computeRandomRegions(Sector sector, int div, int numRegions)
protected int computeRegionDivisions(Sector sector, int levelNumber, int maxCount)
protected long countTilesInSector(Sector sector, int levelNumber)
protected long estimateAverageTileSize()
protected long estimateMissingTilesCount(int numSamples)
protected long getEstimatedMissingDataSize()
protected ArrayList<Tile> getMissingTilesInSector(Sector sector, int levelNumber) throws InterruptedException
InterruptedException
protected boolean isTileLocalOrAbsent(Tile tile)
protected void normalizeProgress()
protected void removeAbsentTile(Tile tile)
protected void removeRetrievedTile(Tile tile)
public void run()
run
in interface Runnable
run
in class BulkRetrievalThread
protected void submitMissingTilesRequests() throws InterruptedException
InterruptedException