NASA World Wind

gov.nasa.worldwind.data
Class TiledRasterProducer

java.lang.Object
  extended by gov.nasa.worldwind.avlist.AVListImpl
      extended by gov.nasa.worldwind.WWObjectImpl
          extended by gov.nasa.worldwind.data.AbstractDataStoreProducer
              extended by gov.nasa.worldwind.data.TiledRasterProducer
All Implemented Interfaces:
AVList, DataStoreProducer, WWObject, java.beans.PropertyChangeListener, java.util.EventListener
Direct Known Subclasses:
TiledElevationProducer, TiledImageProducer

public abstract class TiledRasterProducer
extends AbstractDataStoreProducer


Field Summary
 
Fields inherited from class gov.nasa.worldwind.avlist.AVListImpl
changeSupport
 
Constructor Summary
TiledRasterProducer()
           
TiledRasterProducer(MemoryCache cache, int writeThreadPoolSize)
           
 
Method Summary
protected  void assembleDataRasters()
           
protected  void assembleDataSource(DataSource dataSource)
           
protected  Sector computeBoundingSector(java.lang.Iterable<? extends DataRaster> rasters)
           
protected  LatLon computeDesiredTileDelta(Sector sector)
           
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  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  java.lang.Object findWriterFor(DataRaster raster, java.lang.String formatSuffix, java.io.File destination, DataRasterWriter[] writers)
           
protected  MemoryCache getCache()
           
protected abstract  DataRasterReader[] getDataRasterReaders()
           
protected abstract  DataRasterWriter[] getDataRasterWriters()
           
 java.lang.String getDataSourceDescription()
           
protected  java.util.concurrent.Semaphore getTileWriteSemaphore()
           
protected  java.util.concurrent.ExecutorService getTileWriteService()
           
protected  void initLevelSetParameters(AVList params)
           
protected  void initProductionParameters(AVList params)
           
protected  void installDataDescriptor(AVList params)
           
protected  void installLevelSet(LevelSet levelSet, AVList params)
           
protected  java.io.File installLocationFor(AVList params)
           
protected  java.lang.Object installLocationForDescriptor(DataDescriptor descriptor, DataDescriptorWriter writer)
           
protected  java.lang.Object installLocationForTile(AVList installParams, Tile tile)
           
protected  void installTileRaster(Tile tile, DataRaster tileRaster, AVList params)
           
protected  void installTileRasterComplete()
           
protected  void installTileRasterLater(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)
           
 void removeProductionState()
           
protected  void setProgressParams(LevelSet levelSet)
           
protected  void startProgress()
           
protected  void updateProgress()
           
protected  java.lang.String validateDataSource(DataSource dataSource)
           
protected  java.lang.String validateProductionParameters(AVList parameters)
           
protected  void waitForInstallTileTasks()
           
 
Methods inherited from class gov.nasa.worldwind.data.AbstractDataStoreProducer
acceptsDataSource, containsDataSource, getDataSourceList, getDataSources, getProductionResults, getProductionResultsList, getStoreParameters, isStopped, offerAllDataSources, offerDataSource, removeAllDataSources, removeDataSource, setStoreParameters, startProduction, stopProduction
 
Methods inherited from class gov.nasa.worldwind.WWObjectImpl
propertyChange
 
Methods inherited from class gov.nasa.worldwind.avlist.AVListImpl
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getDoubleValue, getDoubleValue, getEntries, getIntegerValue, getIntegerValue, getLongValue, getLongValue, getStringValue, getStringValue, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface gov.nasa.worldwind.avlist.AVList
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getEntries, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues
 
Methods inherited from interface java.beans.PropertyChangeListener
propertyChange
 

Constructor Detail

TiledRasterProducer

public TiledRasterProducer()

TiledRasterProducer

public TiledRasterProducer(MemoryCache cache,
                           int writeThreadPoolSize)
Method Detail

assembleDataRasters

protected void assembleDataRasters()
                            throws java.lang.Exception
Throws:
java.lang.Exception

assembleDataSource

protected void assembleDataSource(DataSource dataSource)
                           throws java.lang.Exception
Throws:
java.lang.Exception

computeBoundingSector

protected Sector computeBoundingSector(java.lang.Iterable<? extends DataRaster> rasters)

computeDesiredTileDelta

protected LatLon computeDesiredTileDelta(Sector sector)

computeNumLevels

protected int computeNumLevels(LatLon levelZeroDelta,
                               LatLon lastLevelDelta)

computeRasterPixelSize

protected LatLon computeRasterPixelSize(DataRaster raster)

computeRasterTileDelta

protected LatLon computeRasterTileDelta(int tileWidth,
                                        int tileHeight,
                                        java.lang.Iterable<? extends DataRaster> rasters)

computeSmallestPixelSize

protected LatLon computeSmallestPixelSize(java.lang.Iterable<? extends DataRaster> rasters)

createDataRaster

protected abstract DataRaster createDataRaster(int width,
                                               int height,
                                               Sector sector,
                                               AVList params)

createDefaultCache

protected static MemoryCache createDefaultCache()

createDefaultTileWriteService

protected java.util.concurrent.ExecutorService createDefaultTileWriteService(int threadPoolSize)

createSubTiles

protected Tile[] createSubTiles(Tile tile,
                                Level nextLevel)

createTileRaster

protected DataRaster createTileRaster(LevelSet levelSet,
                                      Tile tile,
                                      AVList params)
                               throws java.io.IOException
Throws:
java.io.IOException

doStartProduction

protected void doStartProduction(AVList parameters)
                          throws java.lang.Exception
Specified by:
doStartProduction in class AbstractDataStoreProducer
Throws:
java.lang.Exception

drawDataSources

protected DataRaster drawDataSources(LevelSet levelSet,
                                     Tile tile,
                                     java.lang.Iterable<DataRaster> dataRasters,
                                     AVList params)
                              throws java.io.IOException
Throws:
java.io.IOException

drawDescendants

protected DataRaster drawDescendants(LevelSet levelSet,
                                     Tile tile,
                                     AVList params)
                              throws java.io.IOException
Throws:
java.io.IOException

findWriterFor

protected java.lang.Object findWriterFor(DataRaster raster,
                                         java.lang.String formatSuffix,
                                         java.io.File destination,
                                         DataRasterWriter[] writers)

getCache

protected MemoryCache getCache()

getDataRasterReaders

protected abstract DataRasterReader[] getDataRasterReaders()

getDataRasterWriters

protected abstract DataRasterWriter[] getDataRasterWriters()

getDataSourceDescription

public java.lang.String getDataSourceDescription()

getTileWriteSemaphore

protected java.util.concurrent.Semaphore getTileWriteSemaphore()

getTileWriteService

protected java.util.concurrent.ExecutorService getTileWriteService()

initLevelSetParameters

protected void initLevelSetParameters(AVList params)

initProductionParameters

protected void initProductionParameters(AVList params)

installDataDescriptor

protected void installDataDescriptor(AVList params)
                              throws java.io.IOException
Throws:
java.io.IOException

installLevelSet

protected void installLevelSet(LevelSet levelSet,
                               AVList params)
                        throws java.io.IOException
Throws:
java.io.IOException

installLocationFor

protected java.io.File installLocationFor(AVList params)

installLocationForDescriptor

protected java.lang.Object installLocationForDescriptor(DataDescriptor descriptor,
                                                        DataDescriptorWriter writer)

installLocationForTile

protected java.lang.Object installLocationForTile(AVList installParams,
                                                  Tile tile)

installTileRaster

protected void installTileRaster(Tile tile,
                                 DataRaster tileRaster,
                                 AVList params)
                          throws java.io.IOException
Throws:
java.io.IOException

installTileRasterComplete

protected void installTileRasterComplete()

installTileRasterLater

protected void installTileRasterLater(Tile tile,
                                      DataRaster tileRaster,
                                      AVList params)

isDataSetLarge

protected boolean isDataSetLarge(java.lang.Iterable<? extends DataRaster> rasters,
                                 int largeThreshold)

isWithinLatLonLimits

protected boolean isWithinLatLonLimits(Sector sector,
                                       LatLon tileDelta,
                                       LatLon tileOrigin)

removeProductionState

public void removeProductionState()
Specified by:
removeProductionState in interface DataStoreProducer
Overrides:
removeProductionState in class AbstractDataStoreProducer

setProgressParams

protected void setProgressParams(LevelSet levelSet)

startProgress

protected void startProgress()

updateProgress

protected void updateProgress()

validateDataSource

protected java.lang.String validateDataSource(DataSource dataSource)
Specified by:
validateDataSource in class AbstractDataStoreProducer

validateProductionParameters

protected java.lang.String validateProductionParameters(AVList parameters)
Specified by:
validateProductionParameters in class AbstractDataStoreProducer

waitForInstallTileTasks

protected void waitForInstallTileTasks()

NASA World Wind