ilog.views.maps.format.dted
Class IlvRasterDTEDReader

java.lang.Object
  extended by ilog.views.maps.raster.IlvRasterAbstractReader
      extended by ilog.views.maps.format.dted.IlvRasterDTEDReader
All Implemented Interfaces:
IlvPersistentObject, IlvMapFeatureIterator, IlvMapReusableFeatureIterator

public class IlvRasterDTEDReader
extends IlvRasterAbstractReader
implements IlvPersistentObject

Reader of DTED files. Example of use:

   IlvRasterDTEDReader r = new IlvRasterDTEDReader();
   r.addMap(fileName);
  // create a datasource for the dted reader.
  IlvMapDataSource DTEDDataSource = IlvRasterDataSourceFactory.buildTiledImageDataSource(manager,r,true,true,null);
  // insert it in the manager's data source tree
  IlvMapDataSourceModel dataSourceModel = IlvMapDataSourceProperty.GetMapDataSourceModel(view.getManager());
  dataSourceModel.insert(DTEDDataSource);
  // start reading (recusively start all data sources of this model)
  dataSourceModel.start();
  // get the DTED  maplayer used to display that data source
  IlvMapLayer DTEDLayer = DTEDDataSource.getInsertionLayer();
  // insert it on the manager's map layer tree
  IlvMapLayerTreeModel ltm = IlvMapLayerTreeProperty.GetMapLayerTreeModel(view.getManager());
  ltm.addChild(null, DTEDLayer);
 

Since:
JViews 7.5

Field Summary
 
Fields inherited from class ilog.views.maps.raster.IlvRasterAbstractReader
needReload
 
Constructor Summary
IlvRasterDTEDReader()
          Default constructor
IlvRasterDTEDReader(IlvInputStream stream)
          Constructor from stream
 
Method Summary
 boolean addMap(String fileName)
          Adds a new DTED image.
 boolean addMap(URL url)
          Adds a new DTED image.
 IlvCoordinateSystem getCoordinateSystem()
          Returns a WGS84 system.
 IlvMathTransform getInternalTransformation(int imageIndex)
          Return the projection associated with the raster stored at the given index.
 IlvFeatureAttributeProperty getProperties(int imageIndex)
          Returns the feature properties to be associated with the image.
 void reload(IlvThreadMonitoringData monitorInfo)
          Given the state of the reader (how many images were read, coverage zone,...), the purpose of this method is to recreate all images from the original source.
 void write(IlvOutputStream stream)
          Writes the attributes of a persistent object.
 
Methods inherited from class ilog.views.maps.raster.IlvRasterAbstractReader
addRaster, computeGisImageBounds, computeLimits, createRasterTileLoader, dispose, getDefaultFeatureRenderer, getImageBounds, getImageCount, getInverseTransformation, getLowerRightCorner, getLowerRightCorner, getMaximumIntervalsForDeterminingImageLocation, getNextFeature, getRasterMappedBuffer, getRasterProperties, getTileLoader, getTileLoader, getTileLoaders, getTransformation, getUpperLeftCorner, getUpperLeftCorner, isGeoreferenced, isHighQualityRendering, isNeedReload, removeRaster, restart, setHighQualityRendering, setMaximumIntervalsForDeterminingImageLocation, setTransformation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IlvRasterDTEDReader

public IlvRasterDTEDReader()
Default constructor


IlvRasterDTEDReader

public IlvRasterDTEDReader(IlvInputStream stream)
                    throws IlvReadFileException
Constructor from stream

Parameters:
stream -
Throws:
IlvReadFileException
Method Detail

write

public void write(IlvOutputStream stream)
           throws IOException
Writes the attributes of a persistent object.

Specified by:
write in interface IlvPersistentObject
Overrides:
write in class IlvRasterAbstractReader
Parameters:
stream - The output stream.
Throws:
IOException - thrown when an exception occurs during the write operation for this object.

addMap

public boolean addMap(String fileName)
               throws IOException
Adds a new DTED image.

Parameters:
fileName - Path pointing to one of the DTED files (.dt0,.dt1,.dt2)
Returns:
true. The color model is built through the use of a { @link IlvRasterElevationColorModelFactory}
Throws:
IOException - if the fileName is an unrecognized file.

addMap

public boolean addMap(URL url)
               throws IOException
Adds a new DTED image.

Parameters:
url - URL pointing to one of the DTED files (.dt0,.dt1,.dt2)
Returns:
true.
Throws:
IOException - if the url is an unrecognized file.
Since:
JViews 7.5

reload

public void reload(IlvThreadMonitoringData monitorInfo)
Given the state of the reader (how many images were read, coverage zone,...), the purpose of this method is to recreate all images from the original source. Note : this method should not rely on the list of IlvRasterProperties of the reader as they might not be saved when the theme only is saved.

Overrides:
reload in class IlvRasterAbstractReader
Parameters:
monitorInfo - Used to update task progress.

getCoordinateSystem

public IlvCoordinateSystem getCoordinateSystem()
Returns a WGS84 system.

Specified by:
getCoordinateSystem in interface IlvMapFeatureIterator
Returns:
The coordinate system, or null if the coordinate system is unknown.
See Also:
IlvMapFeatureIterator.getCoordinateSystem()

getInternalTransformation

public IlvMathTransform getInternalTransformation(int imageIndex)
Return the projection associated with the raster stored at the given index.

Specified by:
getInternalTransformation in class IlvRasterAbstractReader
Parameters:
imageIndex - The index of the raster.
Returns:
The projection that corresponds to the raster stored at the given index.
See Also:
IlvRasterAbstractReader.getInternalTransformation(int)

getProperties

public IlvFeatureAttributeProperty getProperties(int imageIndex)
Returns the feature properties to be associated with the image.

Specified by:
getProperties in class IlvRasterAbstractReader
Parameters:
imageIndex - The index of the image.
Returns:
The properties to be associated with the image.
See Also:
IlvRasterAbstractReader.getProperties(int)


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