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, PropertyChangeListener, 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(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, Iterable<? extends DataRaster> rasters)
           
protected  LatLon computeSmallestPixelSize(Iterable<? extends DataRaster> rasters)
           
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  Object findWriterFor(DataRaster raster, String formatSuffix, File destination, DataRasterWriter[] writers)
           
protected  MemoryCache getCache()
           
protected abstract  DataRasterReader[] getDataRasterReaders()
           
protected abstract  DataRasterWriter[] getDataRasterWriters()
           
 String getDataSourceDescription()
           
protected  Semaphore getTileWriteSemaphore()
           
protected  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  File installLocationFor(AVList params)
           
protected  Object installLocationForDescriptor(DataDescriptor descriptor, DataDescriptorWriter writer)
           
protected  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(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  String validateDataSource(DataSource dataSource)
           
protected  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 Exception
Throws:
Exception

assembleDataSource

protected void assembleDataSource(DataSource dataSource)
                           throws Exception
Throws:
Exception

computeBoundingSector

protected Sector computeBoundingSector(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,
                                        Iterable<? extends DataRaster> rasters)

computeSmallestPixelSize

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

createDataRaster

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

createDefaultCache

protected static MemoryCache createDefaultCache()

createDefaultTileWriteService

protected ExecutorService createDefaultTileWriteService(int threadPoolSize)

createSubTiles

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

createTileRaster

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

doStartProduction

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

drawDataSources

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

drawDescendants

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

findWriterFor

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

getCache

protected MemoryCache getCache()

getDataRasterReaders

protected abstract DataRasterReader[] getDataRasterReaders()

getDataRasterWriters

protected abstract DataRasterWriter[] getDataRasterWriters()

getDataSourceDescription

public String getDataSourceDescription()

getTileWriteSemaphore

protected Semaphore getTileWriteSemaphore()

getTileWriteService

protected ExecutorService getTileWriteService()

initLevelSetParameters

protected void initLevelSetParameters(AVList params)

initProductionParameters

protected void initProductionParameters(AVList params)

installDataDescriptor

protected void installDataDescriptor(AVList params)
                              throws IOException
Throws:
IOException

installLevelSet

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

installLocationFor

protected File installLocationFor(AVList params)

installLocationForDescriptor

protected Object installLocationForDescriptor(DataDescriptor descriptor,
                                              DataDescriptorWriter writer)

installLocationForTile

protected Object installLocationForTile(AVList installParams,
                                        Tile tile)

installTileRaster

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

installTileRasterComplete

protected void installTileRasterComplete()

installTileRasterLater

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

isDataSetLarge

protected boolean isDataSetLarge(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 String validateDataSource(DataSource dataSource)
Specified by:
validateDataSource in class AbstractDataStoreProducer

validateProductionParameters

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

waitForInstallTileTasks

protected void waitForInstallTileTasks()

NASA World Wind