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(org.w3c.dom.Element context,
AVList properties) |
protected void |
appendSource(org.w3c.dom.Element sources,
CachedDataRaster raster) |
protected void |
assembleDataRasters() |
protected void |
assembleDataSource(java.lang.Object source,
AVList params) |
protected void |
calculateTileCount(LevelSet levelSet,
AVList params) |
protected Sector |
computeBoundingSector(java.lang.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,
java.lang.Iterable<? extends DataRaster> rasters) |
protected LatLon |
computeSmallestPixelSize(java.lang.Iterable<? extends DataRaster> rasters) |
protected abstract org.w3c.dom.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 java.util.concurrent.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,
java.lang.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 java.lang.Object |
findWriterFor(DataRaster raster,
java.lang.String formatSuffix,
java.io.File destination,
DataRasterWriter[] writers) |
protected MemoryCache |
getCache() |
protected java.io.File |
getConfigFileInstallLocation(AVList params)
Returns the location of the configuration file which describes the tiled data produced by this
TiledRasterProducer.
|
protected abstract DataRasterReader[] |
getDataRasterReaders() |
java.lang.Iterable<DataRaster> |
getDataRasters() |
protected abstract DataRasterWriter[] |
getDataRasterWriters() |
java.lang.String |
getDataSourceDescription() |
protected DataRasterReaderFactory |
getReaderFactory() |
protected java.util.concurrent.Semaphore |
getTileWriteSemaphore() |
protected java.util.concurrent.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 java.io.File |
installLocationFor(AVList params) |
protected java.lang.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(java.lang.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 java.lang.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
onMessage
public TiledRasterProducer()
public TiledRasterProducer(MemoryCache cache, int writeThreadPoolSize)
protected void appendProperties(org.w3c.dom.Element context, AVList properties)
protected void appendSource(org.w3c.dom.Element sources, CachedDataRaster raster) throws WWRuntimeException
WWRuntimeException
protected void assembleDataRasters() throws java.lang.Exception
java.lang.Exception
protected void assembleDataSource(java.lang.Object source, AVList params) throws java.lang.Exception
java.lang.Exception
protected Sector computeBoundingSector(java.lang.Iterable<? extends DataRaster> rasters)
protected LatLon computeIntegralLevelZeroTileDelta(LatLon originalDelta)
protected LatLon computeRasterPixelSize(DataRaster raster)
protected LatLon computeRasterTileDelta(int tileWidth, int tileHeight, java.lang.Iterable<? extends DataRaster> rasters)
protected LatLon computeSmallestPixelSize(java.lang.Iterable<? extends DataRaster> rasters)
protected abstract org.w3c.dom.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 java.util.concurrent.ExecutorService createDefaultTileWriteService(int threadPoolSize)
protected DataRaster createTileRaster(LevelSet levelSet, Tile tile, AVList params) throws java.io.IOException
java.io.IOException
protected void doStartProduction(AVList parameters) throws java.lang.Exception
doStartProduction
in class AbstractDataStoreProducer
java.lang.Exception
protected DataRaster drawDataSources(LevelSet levelSet, Tile tile, java.lang.Iterable<DataRaster> dataRasters, AVList params) throws java.io.IOException
java.io.IOException
protected DataRaster drawDescendants(LevelSet levelSet, Tile tile, AVList params) throws java.io.IOException
java.io.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 java.lang.Object findWriterFor(DataRaster raster, java.lang.String formatSuffix, java.io.File destination, DataRasterWriter[] writers)
protected MemoryCache getCache()
protected java.io.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 java.lang.Iterable<DataRaster> getDataRasters()
protected abstract DataRasterWriter[] getDataRasterWriters()
public java.lang.String getDataSourceDescription()
protected DataRasterReaderFactory getReaderFactory()
protected java.util.concurrent.Semaphore getTileWriteSemaphore()
protected java.util.concurrent.ExecutorService getTileWriteService()
protected void initLevelSetParameters(AVList params)
protected abstract void initProductionParameters(AVList params)
protected void installConfigFile(AVList params) throws java.lang.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.java.lang.Exception
- if the configuration file cannot be installed for any reason.java.lang.IllegalArgumentException
- if the parameter list is null.protected void installLevelSet(LevelSet levelSet, AVList params) throws java.io.IOException
java.io.IOException
protected java.io.File installLocationFor(AVList params)
protected java.lang.Object installLocationForTile(AVList installParams, Tile tile)
protected void installRasterServerConfigFile(AVList productionParams)
protected void installTileRaster(Tile tile, DataRaster tileRaster, AVList params) throws java.io.IOException
java.io.IOException
protected void installTileRasterComplete()
protected void installTileRasterLater(LevelSet levelSet, Tile tile, DataRaster tileRaster, AVList params)
protected boolean isDataSetLarge(java.lang.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 java.lang.String validateProductionParameters(AVList parameters)
validateProductionParameters
in class AbstractDataStoreProducer
protected void waitForInstallTileTasks()