public abstract class TiledRasterProducer extends AbstractDataStoreProducer
AbstractDataStoreProducer.SourceInfo
productionParams
Constructor and Description |
---|
TiledRasterProducer() |
TiledRasterProducer(MemoryCache cache,
int writeThreadPoolSize) |
Modifier and Type | Method and Description |
---|---|
protected void |
appendProperties(Element context,
AVList properties) |
protected void |
appendSource(Element sources,
CachedDataRaster raster) |
protected void |
assembleDataRasters() |
protected void |
assembleDataSource(Object source,
AVList params) |
protected void |
calculateTileCount(LevelSet levelSet,
AVList params) |
protected Sector |
computeBoundingSector(Iterable<? extends DataRaster> rasters) |
protected LatLon |
computeDesiredTileDelta(Sector sector) |
protected LatLon |
computeIntegralLevelZeroTileDelta(LatLon originalDelta) |
protected int |
computeNumLevels(LatLon levelZeroDelta,
LatLon lastLevelDelta) |
protected LatLon |
computeRasterPixelSize(DataRaster raster) |
protected LatLon |
computeRasterTileDelta(int tileWidth,
int tileHeight,
Iterable<? extends DataRaster> rasters) |
protected LatLon |
computeSmallestPixelSize(Iterable<? extends DataRaster> rasters) |
protected abstract Document |
createConfigDoc(AVList params)
Returns a configuration document which describes the tiled data produced by this TiledRasterProducer.
|
protected abstract DataRaster |
createDataRaster(int width,
int height,
Sector sector,
AVList params) |
protected static MemoryCache |
createDefaultCache() |
protected ExecutorService |
createDefaultTileWriteService(int threadPoolSize) |
protected Tile[] |
createSubTiles(Tile tile,
Level nextLevel) |
protected DataRaster |
createTileRaster(LevelSet levelSet,
Tile tile,
AVList params) |
protected void |
doStartProduction(AVList parameters) |
protected DataRaster |
drawDataSources(LevelSet levelSet,
Tile tile,
Iterable<DataRaster> dataRasters,
AVList params) |
protected DataRaster |
drawDescendants(LevelSet levelSet,
Tile tile,
AVList params) |
protected int |
extractMaxLevelLimit(AVList params,
int maxNumOfLevels)
Extracts a maximum level limit from the AVList if the AVList contains AVKey.TILED_RASTER_PRODUCER_LIMIT_MAX_LEVEL.
|
protected Object |
findWriterFor(DataRaster raster,
String formatSuffix,
File destination,
DataRasterWriter[] writers) |
protected MemoryCache |
getCache() |
protected File |
getConfigFileInstallLocation(AVList params)
Returns the location of the configuration file which describes the tiled data produced by this
TiledRasterProducer.
|
protected abstract DataRasterReader[] |
getDataRasterReaders() |
Iterable<DataRaster> |
getDataRasters() |
protected abstract DataRasterWriter[] |
getDataRasterWriters() |
String |
getDataSourceDescription() |
protected DataRasterReaderFactory |
getReaderFactory() |
protected Semaphore |
getTileWriteSemaphore() |
protected ExecutorService |
getTileWriteService() |
protected void |
initLevelSetParameters(AVList params) |
protected abstract void |
initProductionParameters(AVList params) |
protected void |
installConfigFile(AVList params)
Installs the configuration file which describes the tiled data produced by this TiledRasterProducer.
|
protected void |
installLevelSet(LevelSet levelSet,
AVList params) |
protected File |
installLocationFor(AVList params) |
protected Object |
installLocationForTile(AVList installParams,
Tile tile) |
protected void |
installRasterServerConfigFile(AVList productionParams) |
protected void |
installTileRaster(Tile tile,
DataRaster tileRaster,
AVList params) |
protected void |
installTileRasterComplete() |
protected void |
installTileRasterLater(LevelSet levelSet,
Tile tile,
DataRaster tileRaster,
AVList params) |
protected boolean |
isDataSetLarge(Iterable<? extends DataRaster> rasters,
int largeThreshold) |
protected boolean |
isFinalLevel(LevelSet levelSet,
int levelNumber,
AVList params) |
protected boolean |
isWithinLatLonLimits(Sector sector,
LatLon tileDelta,
LatLon tileOrigin) |
void |
removeProductionState() |
protected void |
startProgress() |
protected void |
updateProgress() |
protected String |
validateProductionParameters(AVList parameters) |
protected void |
waitForInstallTileTasks() |
acceptsDataSource, containsDataSource, getDataSourceList, getDataSources, getProductionParameters, getProductionResults, getProductionResultsList, getStoreParameters, isStopped, offerAllDataSources, offerDataSource, removeAllDataSources, removeDataSource, setStoreParameters, startProduction, stopProduction, validateDataSource
onMessage, propertyChange
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getBooleanValue, getBooleanValue, getChangeSupport, getDoubleValue, getDoubleValue, getEntries, getIntegerValue, getIntegerValue, getLongValue, getLongValue, getRestorableStateForAVPair, getStringValue, getStringValue, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getEntries, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues
propertyChange
onMessage
public TiledRasterProducer()
public TiledRasterProducer(MemoryCache cache, int writeThreadPoolSize)
protected void appendSource(Element sources, CachedDataRaster raster) throws WWRuntimeException
WWRuntimeException
protected void assembleDataSource(Object source, AVList params) throws Exception
Exception
protected Sector computeBoundingSector(Iterable<? extends DataRaster> rasters)
protected LatLon computeIntegralLevelZeroTileDelta(LatLon originalDelta)
protected LatLon computeRasterPixelSize(DataRaster raster)
protected LatLon computeRasterTileDelta(int tileWidth, int tileHeight, Iterable<? extends DataRaster> rasters)
protected LatLon computeSmallestPixelSize(Iterable<? extends DataRaster> rasters)
protected abstract Document createConfigDoc(AVList params)
params
- the parameters which describe the configuration document's contents.protected abstract DataRaster createDataRaster(int width, int height, Sector sector, AVList params)
protected static MemoryCache createDefaultCache()
protected ExecutorService createDefaultTileWriteService(int threadPoolSize)
protected DataRaster createTileRaster(LevelSet levelSet, Tile tile, AVList params) throws IOException
IOException
protected void doStartProduction(AVList parameters) throws Exception
doStartProduction
in class AbstractDataStoreProducer
Exception
protected DataRaster drawDataSources(LevelSet levelSet, Tile tile, Iterable<DataRaster> dataRasters, AVList params) throws IOException
IOException
protected DataRaster drawDescendants(LevelSet levelSet, Tile tile, AVList params) throws IOException
IOException
protected int extractMaxLevelLimit(AVList params, int maxNumOfLevels)
maxNumOfLevels
- the actual maximum numbers of levels.
The AVKey.TILED_RASTER_PRODUCER_LIMIT_MAX_LEVEL could specify multiple things:
If the value of the AVKey.TILED_RASTER_PRODUCER_LIMIT_MAX_LEVEL is "Auto" (as String), the calculated limit of
levels will be 70% of the actual maximum numbers of levels maxNumOfLevels
.
If the type of the value of the AVKey.TILED_RASTER_PRODUCER_LIMIT_MAX_LEVEL is Integer, it should contain an
integer number between 0 (for level 0 only) and the actual maximum numbers of levels
maxNumOfLevels
.
It is also possible to specify the limit as percents, in this case the type of the
AVKey.TILED_RASTER_PRODUCER_LIMIT_MAX_LEVEL value must be "String", have a numeric value as text and the "%"
percent sign in the end. Examples: "100%", "25%", "50%", etc.
Value of AVKey.TILED_RASTER_PRODUCER_LIMIT_MAX_LEVEL could be a numeric string (for example, "3"), or Integer.
The value will be correctly extracted and compared with the maxNumOfLevels
. Valid values must be
smaller or equal to maxNumOfLevels
.params
- AVList that may contain AVKey.TILED_RASTER_PRODUCER_LIMIT_MAX_LEVEL propertymaxNumOfLevels
- The actual maximum numbers of levelsprotected Object findWriterFor(DataRaster raster, String formatSuffix, File destination, DataRasterWriter[] writers)
protected MemoryCache getCache()
protected File getConfigFileInstallLocation(AVList params)
Key | |
---|---|
AVKey.FILE_STORE_LOCATION | |
AVKey.DATA_CACHE_NAME | |
AVKey.DATASET_NAME |
params
- the parameters which describe the install location.protected abstract DataRasterReader[] getDataRasterReaders()
public Iterable<DataRaster> getDataRasters()
protected abstract DataRasterWriter[] getDataRasterWriters()
public String getDataSourceDescription()
protected DataRasterReaderFactory getReaderFactory()
protected Semaphore getTileWriteSemaphore()
protected ExecutorService getTileWriteService()
protected void initLevelSetParameters(AVList params)
protected abstract void initProductionParameters(AVList params)
protected void installConfigFile(AVList params) throws Exception
Key | |
---|---|
AVKey.FILE_STORE_LOCATION | |
AVKey.DATA_CACHE_NAME | |
AVKey.DATASET_NAME |
params
- the parameters which describe the install location, the configuration filename, and the
configuration file contents.Exception
- if the configuration file cannot be installed for any reason.IllegalArgumentException
- if the parameter list is null.protected void installLevelSet(LevelSet levelSet, AVList params) throws IOException
IOException
protected void installRasterServerConfigFile(AVList productionParams)
protected void installTileRaster(Tile tile, DataRaster tileRaster, AVList params) throws IOException
IOException
protected void installTileRasterComplete()
protected void installTileRasterLater(LevelSet levelSet, Tile tile, DataRaster tileRaster, AVList params)
protected boolean isDataSetLarge(Iterable<? extends DataRaster> rasters, int largeThreshold)
protected boolean isWithinLatLonLimits(Sector sector, LatLon tileDelta, LatLon tileOrigin)
public void removeProductionState()
removeProductionState
in interface DataStoreProducer
removeProductionState
in class AbstractDataStoreProducer
protected void startProgress()
protected void updateProgress()
protected String validateProductionParameters(AVList parameters)
validateProductionParameters
in class AbstractDataStoreProducer
protected void waitForInstallTileTasks()