NASA World Wind

gov.nasa.worldwind.layers
Class TiledImageLayer

java.lang.Object
  extended by gov.nasa.worldwind.avlist.AVListImpl
      extended by gov.nasa.worldwind.WWObjectImpl
          extended by gov.nasa.worldwind.layers.AbstractLayer
              extended by gov.nasa.worldwind.layers.TiledImageLayer
All Implemented Interfaces:
AVList, Disposable, MessageListener, Layer, Restorable, WWObject, PropertyChangeListener, EventListener
Direct Known Subclasses:
BasicTiledImageLayer, RPFTiledImageLayer

public abstract class TiledImageLayer
extends AbstractLayer


Nested Class Summary
protected  class TiledImageLayer.CompositionRetrievalPostProcessor
           
protected static class TiledImageLayer.LevelComparer
           
 
Field Summary
protected  boolean atMaxResolution
           
protected  TextureTile currentResourceTile
           
protected  ArrayList<TextureTile> currentTiles
           
protected  double detailHint
           
protected  double detailHintOrigin
           
protected  boolean drawBoundingVolumes
           
protected  boolean drawTileBoundaries
           
protected  boolean forceLevelZeroLoads
           
protected static TiledImageLayer.LevelComparer levelComparer
           
protected  LevelSet levels
           
protected  boolean levelZeroLoaded
           
protected  PriorityBlockingQueue<Runnable> requestQ
           
protected  boolean retainLevelZeroTiles
           
protected  ArrayList<String> supportedImageFormats
           
protected  String textureFormat
           
protected  String tileCountName
           
protected  ArrayList<TextureTile> topLevels
           
protected  boolean useMipMaps
           
protected  boolean useTransparentTextures
           
 
Constructor Summary
TiledImageLayer(LevelSet levelSet)
           
 
Method Summary
protected  void addTile(DrawContext dc, TextureTile tile)
           
protected  void addTileOrDescendants(DrawContext dc, TextureTile tile)
           
protected  void addTileToCurrent(TextureTile tile)
           
protected  void assembleTiles(DrawContext dc)
           
protected  boolean atMaxLevel(DrawContext dc)
           
protected  void checkTextureExpiration(DrawContext dc, List<TextureTile> tiles)
           
 BufferedImage composeImageForSector(Sector sector, int canvasWidth, int canvasHeight, double aspectRatio, int levelNumber, String mimeType, boolean abortOnError, BufferedImage image, int timeout)
          Create an image for the portion of this layer lying within a specified sector.
 int computeLevelForResolution(Sector sector, double resolution)
           
protected  Vec4 computeReferencePoint(DrawContext dc)
           
 long countImagesInSector(Sector sector)
           
 long countImagesInSector(Sector sector, int levelNumber)
           
static Document createTiledImageLayerConfigDocument(AVList params)
          Creates a configuration document for a TiledImageLayer described by the specified params.
static Element createTiledImageLayerConfigElements(AVList params, Element context)
          Appends TiledImageLayer configuration parameters as elements to the specified context.
protected  void createTopLevelTiles()
           
protected  void doRender(DrawContext dc)
           
protected  void downloadImage(TextureTile tile, String mimeType, int timeout)
           
protected  void draw(DrawContext dc)
           
protected  void drawBoundingVolumes(DrawContext dc, ArrayList<TextureTile> tiles)
           
protected  void drawTileIDs(DrawContext dc, ArrayList<TextureTile> tiles)
           
protected abstract  void forceTextureLoad(TextureTile tile)
           
 List<String> getAvailableImageFormats()
           
 String getDefaultImageFormat()
           
protected  double getDetailFactor()
           
 double getDetailHint()
          Indicates the layer's detail hint, which is described in setDetailHint(double).
protected  BufferedImage getImage(TextureTile tile, String mimeType, int timeout)
           
protected static AVList getLegacyTiledImageLayerConfigParams(Element domElement, AVList params)
          Parses TiledImageLayer configuration parameters from previous versions of configuration documents.
 LevelSet getLevels()
           
 Double getMaxEffectiveAltitude(Double radius)
          Indicates the altitude above which this layer likely has low value or is not expected to be active.
 Double getMinEffectiveAltitude(Double radius)
          Indicates the altitude below which this layer likely has low value or is not expected to be active.
protected  Vec4 getReferencePoint(DrawContext dc)
           
protected  PriorityBlockingQueue<Runnable> getRequestQ()
           
 String getTextureFormat()
          Returns the format used to store images in texture memory, or null if images are stored in their native format.
static AVList getTiledImageLayerConfigParams(Element domElement, AVList params)
          Parses TiledImageLayer configuration parameters from the specified DOM document.
 TextureTile[][] getTilesInSector(Sector sector, int levelNumber)
           
 List<TextureTile> getTopLevels()
           
 Object getValue(String key)
          Returns the value for a specified key.
 boolean isAtMaxResolution()
          Indicates whether the most recent rendering of the layer rendered the highest resolution imagery or other data available.
 boolean isDrawBoundingVolumes()
           
 boolean isDrawTileBoundaries()
           
 boolean isDrawTileIDs()
           
 boolean isForceLevelZeroLoads()
           
 boolean isImageFormatAvailable(String imageFormat)
           
 boolean isLayerInView(DrawContext dc)
          Indicates whether the layer is in the view.
 boolean isMultiResolution()
          Indicates whether the layer provides multiple resolutions of imagery or other data.
 boolean isRetainLevelZeroTiles()
           
protected  boolean isTileVisible(DrawContext dc, TextureTile tile)
           
 boolean isUseMipMaps()
           
 boolean isUseTransparentTextures()
           
protected  void loadAllTopLevelTextures(DrawContext dc)
           
protected  boolean meetsRenderCriteria(DrawContext dc, TextureTile tile)
           
protected  boolean needToSplit(DrawContext dc, Sector sector, Level level)
           
 void render(DrawContext dc)
          Cause the layer to draw its representation.
protected  BufferedImage requestImage(TextureTile tile, String mimeType)
           
protected abstract  void requestTexture(DrawContext dc, TextureTile tile)
           
protected  void retrieveLocalImage(TextureTile tile, String mimeType, int timeout)
           
protected  void retrieveRemoteImage(TextureTile tile, String mimeType, int timeout)
           
protected  void sendRequests()
           
protected  void setAvailableImageFormats(String[] formats)
           
protected  void setBlendingFunction(DrawContext dc)
           
 void setDetailHint(double detailHint)
          Modifies the default relationship of image resolution to screen resolution as the viewing altitude changes.
 void setDrawBoundingVolumes(boolean drawBoundingVolumes)
           
 void setDrawTileBoundaries(boolean drawTileBoundaries)
           
 void setDrawTileIDs(boolean drawTileIDs)
           
 void setExpiryTime(long expiryTime)
          Specifies the time of the layer's most recent dataset update, beyond which cached data is invalid.
 void setForceLevelZeroLoads(boolean forceLevelZeroLoads)
           
 void setName(String name)
          Set the layer's name.
 void setRetainLevelZeroTiles(boolean retainLevelZeroTiles)
           
 void setTextureFormat(String textureFormat)
          Specifies the format used to store images in texture memory, or null to store images in their native format.
 void setUseMipMaps(boolean useMipMaps)
           
 void setUseTransparentTextures(boolean useTransparentTextures)
           
 Object setValue(String key, Object value)
          Adds a key/value pair to the list.
 
Methods inherited from class gov.nasa.worldwind.layers.AbstractLayer
createLayerConfigElements, dispose, doPick, doPreRender, getDataFileStore, getExpiryTime, getLayerConfigParams, getMaxActiveAltitude, getMinActiveAltitude, getName, getOpacity, getRestorableState, getScale, getScreenCredit, isEnabled, isLayerActive, isLayerConfigDocument, isNetworkRetrievalEnabled, isPickEnabled, pick, preRender, restoreState, setDataFileStore, setEnabled, setMaxActiveAltitude, setMinActiveAltitude, setNetworkRetrievalEnabled, setOpacity, setPickEnabled, setScreenCredit, toString
 
Methods inherited from class gov.nasa.worldwind.WWObjectImpl
onMessage, propertyChange
 
Methods inherited from class gov.nasa.worldwind.avlist.AVListImpl
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getBooleanValue, getBooleanValue, getChangeSupport, getDoubleValue, getDoubleValue, getEntries, getIntegerValue, getIntegerValue, getLongValue, getLongValue, getRestorableStateForAVPair, getStringValue, getStringValue, getStringValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValues
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface gov.nasa.worldwind.avlist.AVList
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getEntries, getStringValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValues
 
Methods inherited from interface java.beans.PropertyChangeListener
propertyChange
 
Methods inherited from interface gov.nasa.worldwind.event.MessageListener
onMessage
 

Field Detail

atMaxResolution

protected boolean atMaxResolution

currentResourceTile

protected TextureTile currentResourceTile

currentTiles

protected ArrayList<TextureTile> currentTiles

detailHint

protected double detailHint

detailHintOrigin

protected double detailHintOrigin

drawBoundingVolumes

protected boolean drawBoundingVolumes

drawTileBoundaries

protected boolean drawTileBoundaries

forceLevelZeroLoads

protected boolean forceLevelZeroLoads

levelComparer

protected static final TiledImageLayer.LevelComparer levelComparer

levels

protected final LevelSet levels

levelZeroLoaded

protected boolean levelZeroLoaded

requestQ

protected PriorityBlockingQueue<Runnable> requestQ

retainLevelZeroTiles

protected boolean retainLevelZeroTiles

supportedImageFormats

protected ArrayList<String> supportedImageFormats

textureFormat

protected String textureFormat

tileCountName

protected String tileCountName

topLevels

protected ArrayList<TextureTile> topLevels

useMipMaps

protected boolean useMipMaps

useTransparentTextures

protected boolean useTransparentTextures
Constructor Detail

TiledImageLayer

public TiledImageLayer(LevelSet levelSet)
Method Detail

addTile

protected void addTile(DrawContext dc,
                       TextureTile tile)

addTileOrDescendants

protected void addTileOrDescendants(DrawContext dc,
                                    TextureTile tile)

addTileToCurrent

protected void addTileToCurrent(TextureTile tile)

assembleTiles

protected void assembleTiles(DrawContext dc)

atMaxLevel

protected boolean atMaxLevel(DrawContext dc)

checkTextureExpiration

protected void checkTextureExpiration(DrawContext dc,
                                      List<TextureTile> tiles)

composeImageForSector

public BufferedImage composeImageForSector(Sector sector,
                                           int canvasWidth,
                                           int canvasHeight,
                                           double aspectRatio,
                                           int levelNumber,
                                           String mimeType,
                                           boolean abortOnError,
                                           BufferedImage image,
                                           int timeout)
                                    throws Exception
Create an image for the portion of this layer lying within a specified sector. The image is created at a specified aspect ratio within a canvas of a specified size. This returns the specified image if this layer has no content in the specified sector.

Parameters:
sector - the sector of interest.
canvasWidth - the width of the canvas.
canvasHeight - the height of the canvas.
aspectRatio - the aspect ratio, width/height, of the window. If the aspect ratio is greater or equal to one, the full width of the canvas is used for the image; the height used is proportional to the inverse of the aspect ratio. If the aspect ratio is less than one, the full height of the canvas is used, and the width used is proportional to the aspect ratio.
levelNumber - the target level of the tiled image layer.
mimeType - the type of image to create, e.g., "png" and "jpg".
abortOnError - indicates whether to stop assembling the image if an error occurs. If false, processing continues until all portions of the layer that intersect the specified sector have been added to the image. Portions for which an error occurs will be blank.
image - if non-null, a BufferedImage in which to place the image. If null, a new buffered image is created. The image must be the width and height specified in the canvasWidth and canvasHeight arguments.
timeout - The amount of time to allow for reading the image from the server.
Returns:
image the assembled image, of size indicated by the canvasWidth and canvasHeight. If the specified aspect ratio is one, all pixels contain values. If the aspect ratio is greater than one, a full-width segment along the top of the canvas is blank. If the aspect ratio is less than one, a full-height segment along the right side of the canvase is blank. If the image argument was non-null, that buffered image is returned.
Throws:
IllegalArgumentException - if sector is null.
Exception
See Also:
;

computeLevelForResolution

public int computeLevelForResolution(Sector sector,
                                     double resolution)

computeReferencePoint

protected Vec4 computeReferencePoint(DrawContext dc)

countImagesInSector

public long countImagesInSector(Sector sector)

countImagesInSector

public long countImagesInSector(Sector sector,
                                int levelNumber)

createTiledImageLayerConfigDocument

public static Document createTiledImageLayerConfigDocument(AVList params)
Creates a configuration document for a TiledImageLayer described by the specified params. The returned document may be used as a construction parameter to BasicTiledImageLayer.

Parameters:
params - parameters describing the TiledImageLayer.
Returns:
a configuration document for the TiledImageLayer.

createTiledImageLayerConfigElements

public static Element createTiledImageLayerConfigElements(AVList params,
                                                          Element context)
Appends TiledImageLayer configuration parameters as elements to the specified context. This appends elements for the following parameters:
ParameterElement PathType
AVKey.SERVICE_NAMEService/@serviceNameString
AVKey.IMAGE_FORMATImageFormatString
AVKey.AVAILABLE_IMAGE_FORMATSAvailableImageFormats/ImageFormatString array
AVKey.FORCE_LEVEL_ZERO_LOADSForceLevelZeroLoadsBoolean
AVKey.RETAIN_LEVEL_ZERO_TILESRetainLevelZeroTilesBoolean
AVKey.TEXTURE_FORMATTextureFormatString
AVKey.USE_MIP_MAPSUseMipMapsBoolean
AVKey.USE_TRANSPARENT_TEXTURESUseTransparentTexturesBoolean
AVKey.URL_CONNECT_TIMEOUTRetrievalTimeouts/ConnectTimeout/TimeInteger milliseconds
AVKey.URL_READ_TIMEOUTRetrievalTimeouts/ReadTimeout/TimeInteger milliseconds
AVKey.RETRIEVAL_QUEUE_STALE_REQUEST_LIMIT RetrievalTimeouts/StaleRequestLimit/TimeInteger milliseconds
This also writes common layer and LevelSet configuration parameters by invoking AbstractLayer.createLayerConfigElements(gov.nasa.worldwind.avlist.AVList, org.w3c.dom.Element) and DataConfigurationUtils.createLevelSetConfigElements(gov.nasa.worldwind.avlist.AVList, org.w3c.dom.Element).

Parameters:
params - the key-value pairs which define the TiledImageLayer configuration parameters.
context - the XML document root on which to append TiledImageLayer configuration elements.
Returns:
a reference to context.
Throws:
IllegalArgumentException - if either the parameters or the context are null.

createTopLevelTiles

protected void createTopLevelTiles()

doRender

protected final void doRender(DrawContext dc)
Specified by:
doRender in class AbstractLayer

downloadImage

protected void downloadImage(TextureTile tile,
                             String mimeType,
                             int timeout)
                      throws Exception
Throws:
Exception

draw

protected void draw(DrawContext dc)

drawBoundingVolumes

protected void drawBoundingVolumes(DrawContext dc,
                                   ArrayList<TextureTile> tiles)

drawTileIDs

protected void drawTileIDs(DrawContext dc,
                           ArrayList<TextureTile> tiles)

forceTextureLoad

protected abstract void forceTextureLoad(TextureTile tile)

getAvailableImageFormats

public List<String> getAvailableImageFormats()

getDefaultImageFormat

public String getDefaultImageFormat()

getDetailFactor

protected double getDetailFactor()

getDetailHint

public double getDetailHint()
Indicates the layer's detail hint, which is described in setDetailHint(double).

Returns:
the detail hint
See Also:
setDetailHint(double)

getImage

protected BufferedImage getImage(TextureTile tile,
                                 String mimeType,
                                 int timeout)
                          throws Exception
Throws:
Exception

getLegacyTiledImageLayerConfigParams

protected static AVList getLegacyTiledImageLayerConfigParams(Element domElement,
                                                             AVList params)
Parses TiledImageLayer configuration parameters from previous versions of configuration documents. This writes output as key-value pairs to params. If a parameter from the XML document already exists in params, that parameter is ignored. Supported key and parameter names are:
ParameterElement PathType
AVKey.TEXTURE_FORMATCompressTextures"image/dds" if CompressTextures is "true"; null otherwise

Parameters:
domElement - the XML document root to parse for legacy TiledImageLayer configuration parameters.
params - the output key-value pairs which recieve the TiledImageLayer configuration parameters. A null reference is permitted.
Returns:
a reference to params, or a new AVList if params is null.
Throws:
IllegalArgumentException - if the document is null.

getLevels

public LevelSet getLevels()

getMaxEffectiveAltitude

public Double getMaxEffectiveAltitude(Double radius)
Description copied from interface: Layer
Indicates the altitude above which this layer likely has low value or is not expected to be active. This value is independent of the maximum active altitude, Layer.setMaxActiveAltitude(double) and does not reflect it.

The returned altitude is valid when the field of view indicated by View.getFieldOfView() is set to its default value. Changing the field of view to any value other than the default may change this layer's maximum effective altitude, but the returned altitude will not reflect that change.

Specified by:
getMaxEffectiveAltitude in interface Layer
Overrides:
getMaxEffectiveAltitude in class AbstractLayer
Parameters:
radius - the radius of the Globe the layer is associated with. May be null, in which case the Earth's equatorial radius is used, Earth.WGS84_EQUATORIAL_RADIUS.
Returns:
the layer's maximum effective altitude.

getMinEffectiveAltitude

public Double getMinEffectiveAltitude(Double radius)
Description copied from interface: Layer
Indicates the altitude below which this layer likely has low value or is not expected to be active. This value is independent of the minimum active altitude, Layer.setMinActiveAltitude(double) and does not reflect it.

The returned altitude is valid when the field of view indicated by View.getFieldOfView() is set to its default value. Changing the field of view to any value other than the default may change this layer's minimum effective altitude, but the returned altitude will not reflect that change.

Specified by:
getMinEffectiveAltitude in interface Layer
Overrides:
getMinEffectiveAltitude in class AbstractLayer
Parameters:
radius - the radius of the Globe the layer is associated with. May be null, in which case the Earth's equatorial radius is used, Earth.WGS84_EQUATORIAL_RADIUS.
Returns:
the layer's minimum effective altitude.

getReferencePoint

protected Vec4 getReferencePoint(DrawContext dc)

getRequestQ

protected PriorityBlockingQueue<Runnable> getRequestQ()

getTextureFormat

public String getTextureFormat()
Returns the format used to store images in texture memory, or null if images are stored in their native format.

Returns:
the texture image format; null if images are stored in their native format.
See Also:
setTextureFormat(String)

getTiledImageLayerConfigParams

public static AVList getTiledImageLayerConfigParams(Element domElement,
                                                    AVList params)
Parses TiledImageLayer configuration parameters from the specified DOM document. This writes output as key-value pairs to params. If a parameter from the XML document already exists in params, that parameter is ignored. Supported key and parameter names are:
ParameterElement PathType
AVKey.SERVICE_NAMEService/@serviceNameString
AVKey.IMAGE_FORMATImageFormatString
AVKey.AVAILABLE_IMAGE_FORMATSAvailableImageFormats/ImageFormatString array
AVKey.FORCE_LEVEL_ZERO_LOADSForceLevelZeroLoadsBoolean
AVKey.RETAIN_LEVEL_ZERO_TILESRetainLevelZeroTilesBoolean
AVKey.TEXTURE_FORMATTextureFormatBoolean
AVKey.USE_MIP_MAPSUseMipMapsBoolean
AVKey.USE_TRANSPARENT_TEXTURESUseTransparentTexturesBoolean
AVKey.URL_CONNECT_TIMEOUTRetrievalTimeouts/ConnectTimeout/TimeInteger milliseconds
AVKey.URL_READ_TIMEOUTRetrievalTimeouts/ReadTimeout/TimeInteger milliseconds
AVKey.RETRIEVAL_QUEUE_STALE_REQUEST_LIMIT RetrievalTimeouts/StaleRequestLimit/TimeInteger milliseconds
This also parses common layer and LevelSet configuration parameters by invoking AbstractLayer.getLayerConfigParams(org.w3c.dom.Element, gov.nasa.worldwind.avlist.AVList) and DataConfigurationUtils.getLevelSetConfigParams(org.w3c.dom.Element, gov.nasa.worldwind.avlist.AVList).

Parameters:
domElement - the XML document root to parse for TiledImageLayer configuration parameters.
params - the output key-value pairs which recieve the TiledImageLayer configuration parameters. A null reference is permitted.
Returns:
a reference to params, or a new AVList if params is null.
Throws:
IllegalArgumentException - if the document is null.

getTilesInSector

public TextureTile[][] getTilesInSector(Sector sector,
                                        int levelNumber)

getTopLevels

public List<TextureTile> getTopLevels()

getValue

public Object getValue(String key)
Description copied from interface: AVList
Returns the value for a specified key.

Specified by:
getValue in interface AVList
Overrides:
getValue in class AVListImpl
Parameters:
key - the attribute name. May not be null.
Returns:
the attribute value if one exists in the collection, otherwise null.

isAtMaxResolution

public boolean isAtMaxResolution()
Description copied from interface: Layer
Indicates whether the most recent rendering of the layer rendered the highest resolution imagery or other data available. Some layers do not track resolution. For those layers this value will always be true. Typically such layers also return false from Layer.isMultiResolution().

Specified by:
isAtMaxResolution in interface Layer
Overrides:
isAtMaxResolution in class AbstractLayer
Returns:
true if the layer is at maximum resolution, otherwise false.

isDrawBoundingVolumes

public boolean isDrawBoundingVolumes()

isDrawTileBoundaries

public boolean isDrawTileBoundaries()

isDrawTileIDs

public boolean isDrawTileIDs()

isForceLevelZeroLoads

public boolean isForceLevelZeroLoads()

isImageFormatAvailable

public boolean isImageFormatAvailable(String imageFormat)

isLayerInView

public boolean isLayerInView(DrawContext dc)
Description copied from interface: Layer
Indicates whether the layer is in the view. The method implemented here is a default indicating the layer is in view. Subclasses able to determine their presence in the view should override this implementation.

Specified by:
isLayerInView in interface Layer
Overrides:
isLayerInView in class AbstractLayer
Parameters:
dc - the current draw context
Returns:
true if the layer is in the view, false otherwise.

isMultiResolution

public boolean isMultiResolution()
Description copied from interface: Layer
Indicates whether the layer provides multiple resolutions of imagery or other data.

Specified by:
isMultiResolution in interface Layer
Overrides:
isMultiResolution in class AbstractLayer
Returns:
true if the layer provides multiple resolutions, else false.

isRetainLevelZeroTiles

public boolean isRetainLevelZeroTiles()

isTileVisible

protected boolean isTileVisible(DrawContext dc,
                                TextureTile tile)

isUseMipMaps

public boolean isUseMipMaps()

isUseTransparentTextures

public boolean isUseTransparentTextures()

loadAllTopLevelTextures

protected void loadAllTopLevelTextures(DrawContext dc)

meetsRenderCriteria

protected boolean meetsRenderCriteria(DrawContext dc,
                                      TextureTile tile)

needToSplit

protected boolean needToSplit(DrawContext dc,
                              Sector sector,
                              Level level)

render

public void render(DrawContext dc)
Description copied from interface: Layer
Cause the layer to draw its representation.

Specified by:
render in interface Layer
Overrides:
render in class AbstractLayer
Parameters:
dc - the current draw context

requestImage

protected BufferedImage requestImage(TextureTile tile,
                                     String mimeType)
                              throws URISyntaxException,
                                     InterruptedIOException,
                                     MalformedURLException
Throws:
URISyntaxException
InterruptedIOException
MalformedURLException

requestTexture

protected abstract void requestTexture(DrawContext dc,
                                       TextureTile tile)

retrieveLocalImage

protected void retrieveLocalImage(TextureTile tile,
                                  String mimeType,
                                  int timeout)
                           throws Exception
Throws:
Exception

retrieveRemoteImage

protected void retrieveRemoteImage(TextureTile tile,
                                   String mimeType,
                                   int timeout)
                            throws Exception
Throws:
Exception

sendRequests

protected void sendRequests()

setAvailableImageFormats

protected void setAvailableImageFormats(String[] formats)

setBlendingFunction

protected void setBlendingFunction(DrawContext dc)

setDetailHint

public void setDetailHint(double detailHint)
Modifies the default relationship of image resolution to screen resolution as the viewing altitude changes. Values greater than 0 cause imagery to appear at higher resolution at greater altitudes than normal, but at an increased performance cost. Values less than 0 decrease the default resolution at any given altitude. The default value is 0. Values typically range between -0.5 and 0.5.

Note: The resolution-to-height relationship is defined by a scale factor that specifies the approximate size of discernible lengths in the image relative to eye distance. The scale is specified as a power of 10. A value of 3, for example, specifies that 1 meter on the surface should be distinguishable from an altitude of 10^3 meters (1000 meters). The default scale is 1/10^2.8, (1 over 10 raised to the power 2.8). The detail hint specifies deviations from that default. A detail hint of 0.2 specifies a scale of 1/1000, i.e., 1/10^(2.8 + .2) = 1/10^3. Scales much larger than 3 typically cause the applied resolution to be higher than discernible for the altitude. Such scales significantly decrease performance.

Parameters:
detailHint - the degree to modify the default relationship of image resolution to screen resolution with changing view altitudes. Values greater than 1 increase the resolution. Values less than zero decrease the resolution. The default value is 0.

setDrawBoundingVolumes

public void setDrawBoundingVolumes(boolean drawBoundingVolumes)

setDrawTileBoundaries

public void setDrawTileBoundaries(boolean drawTileBoundaries)

setDrawTileIDs

public void setDrawTileIDs(boolean drawTileIDs)

setExpiryTime

public void setExpiryTime(long expiryTime)
Specifies the time of the layer's most recent dataset update, beyond which cached data is invalid. If greater than zero, the layer ignores and eliminates any in-memory or on-disk cached data older than the time specified, and requests new information from the data source. If zero, the default, the layer applies any expiry times associated with its individual levels, but only for on-disk cached data. In-memory cached data is expired only when the expiry time is specified with this method and is greater than zero. This method also overwrites the expiry times of the layer's individual levels if the value specified to the method is greater than zero.

Specified by:
setExpiryTime in interface Layer
Overrides:
setExpiryTime in class AbstractLayer
Parameters:
expiryTime - the expiry time of any cached data, expressed as a number of milliseconds beyond the epoch. The default expiry time is zero.
See Also:
for a description of milliseconds beyond the epoch.

setForceLevelZeroLoads

public void setForceLevelZeroLoads(boolean forceLevelZeroLoads)

setName

public void setName(String name)
Description copied from interface: Layer
Set the layer's name. The name is a convenience attribute typically used to identify the layer in user interfaces. By default, a layer has no name.

Specified by:
setName in interface Layer
Overrides:
setName in class AbstractLayer
Parameters:
name - the name to assign to the layer.

setRetainLevelZeroTiles

public void setRetainLevelZeroTiles(boolean retainLevelZeroTiles)

setTextureFormat

public void setTextureFormat(String textureFormat)
Specifies the format used to store images in texture memory, or null to store images in their native format. Supported texture formats are as follows:

Parameters:
textureFormat - the texture image format; null to store images in their native format.

setUseMipMaps

public void setUseMipMaps(boolean useMipMaps)

setUseTransparentTextures

public void setUseTransparentTextures(boolean useTransparentTextures)

setValue

public Object setValue(String key,
                       Object value)
Description copied from interface: AVList
Adds a key/value pair to the list. Replaces an existing key/value pair if the list already contains the key.

Specified by:
setValue in interface AVList
Overrides:
setValue in class AVListImpl
Parameters:
key - the attribute name. May not be null.
value - the attribute value. May be null, in which case any existing value for the key is removed from the collection.
Returns:
previous value associated with specified key, or null if there was no mapping for key. A null return can also indicate that the map previously associated null with the specified key, if the implementation supports null values.

NASA World Wind