ilog.views.maps.format.dted
Class IlvDTEDLayer

java.lang.Object
  extended by ilog.views.IlvIndexedSet
      extended by ilog.views.IlvManagerLayer
          extended by ilog.views.tiling.IlvTiledLayer
              extended by ilog.views.maps.format.dted.IlvDTEDLayer
All Implemented Interfaces:
IlvPersistentObject, Serializable

public class IlvDTEDLayer
extends IlvTiledLayer

Implements a layer that displays a DTED coverage using the load-on-demand mechanism. This layer automatically loads the tiles that are visible in the views of its manager and unloads the tiles that are not visible.

The filename of the tiles are computed from the usual naming specifications for DTED files:
The DTED filenames are named LXX.dtY where L can be 'n' (North) or 's' (South). XX is the latitude of the tile and Y the suffix of the DTED file depending on the DTED level (0, 1 or 2). For example, n09.dt0 is a tile of level 0, located at the latitude 9 North.
The DTED file parent directories are named LXXX where L can be 'e' (East) or 'w' (West) and XXX is the longitude of the DTED tiles contained in a parent directory. For example, w001/ is the directory containing dted tiles located at longitude 1 West.
The characters described above can be uppercase or lowercase. For example, n30.dt1 and N30.DT1 are two valid names for the same DTED tile. The case you use, however, depends on your file system.

The IlvDTEDLayer works only in the geographic projection.

Since:
ILOG JViews 3.0
See Also:
IlvGeographicProjection, Serialized Form

Constructor Summary
IlvDTEDLayer(IlvInputStream stream)
          Reads the layer from an IlvInputStream.
IlvDTEDLayer(String directoryName, int dtedLevel)
          Creates an instance of IlvDTEDLayer.
IlvDTEDLayer(URL dirUrlName, int dtedLevel)
          Creates an instance of a DTED layer.
 
Method Summary
 String getFileName(int row, int col)
          Returns the DTED filename corresponding to the specified row and column.
 IlvFeatureRenderer getRasterRenderer()
          Returns the feature renderer used to create graphic objects representing the DTED rasters.
 void setRasterRenderer(IlvFeatureRenderer renderer)
          Sets the feature renderer used to create graphic objects representing the DTED rasters.
 void write(IlvOutputStream stream)
          Writes the object to an IlvOutputStream.
 
Methods inherited from class ilog.views.tiling.IlvTiledLayer
computeBBox, disconnect, draw, fitTransformerToTile, fitTransformerToTile, getDebugView, getSize, getTileController, getTileLoader, ignoreView, initTileOrigin, isIgnoringView, isVisible, setDebugView, setDebugView, setManager, setSize, setTileLoader
 
Methods inherited from class ilog.views.IlvManagerLayer
addVisibilityFilter, drawImpl, getAlpha, getIndex, getManager, getName, getNamedProperty, getProperty, getVisibilityFilters, isSelectable, isTemporarilyHidden, isVisible, print, removeNamedProperty, removeVisibilityFilter, setAlpha, setName, setNamedProperty, setProperty, writeIt
 
Methods inherited from class ilog.views.IlvIndexedSet
addObject, afterUpdate, beforeUpdate, collectObjects, deleteAll, getCardinal, getElements, getIndex, getManagers, getManagersCount, getObject, getObject, getSubsequentRemoveThreshold, isQuadtreeEnabled, map, mapInside, mapInside, mapIntersects, mapIntersects, removeObject, setIndex, setQuadtreeEnabled, setSubsequentRemoveThreshold
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IlvDTEDLayer

public IlvDTEDLayer(String directoryName,
                    int dtedLevel)
Creates an instance of IlvDTEDLayer. This constructor uses a cache that is shared by all the IlvDTEDLayer instances initialized with this default constructor.

Parameters:
directoryName - The name of the parent DTED directory (usually [any_path]/dted)
dtedLevel - The level of the files to be loaded (0, 1 or 2)

IlvDTEDLayer

public IlvDTEDLayer(URL dirUrlName,
                    int dtedLevel)
Creates an instance of a DTED layer. This constructor uses a cache that will be shared by all the IlvDTEDLayer instances initialized with this default constructor.

Parameters:
dirUrlName - The name of the URL of the parent dted directory
dtedLevel - The level of the files to be loaded (0, 1 or 2)

IlvDTEDLayer

public IlvDTEDLayer(IlvInputStream stream)
             throws IlvReadFileException
Reads the layer from an IlvInputStream.

Parameters:
stream - The input stream
Throws:
IlvReadFileException - if an error occurs while reading.
Method Detail

write

public void write(IlvOutputStream stream)
           throws IOException
Writes the object to an IlvOutputStream.

Specified by:
write in interface IlvPersistentObject
Overrides:
write in class IlvTiledLayer
Parameters:
stream - the output stream
Throws:
IOException - if an errors occurs while writing.

setRasterRenderer

public void setRasterRenderer(IlvFeatureRenderer renderer)
Sets the feature renderer used to create graphic objects representing the DTED rasters. The image renderer must support the IlvMapRaster geometry.

Parameters:
renderer - The feature renderer

getRasterRenderer

public IlvFeatureRenderer getRasterRenderer()
Returns the feature renderer used to create graphic objects representing the DTED rasters. By default, it is an IlvDefaultRasterRenderer.


getFileName

public String getFileName(int row,
                          int col)
Returns the DTED filename corresponding to the specified row and column. For example, getFileName(36, -113) returns "w113/n36.dt0".

Parameters:
row - The row number of the DTED file given in the load-on-demand grid
col - The column number of the DTED file given in the load-on-demand grid


Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.