public class IlvRasterDTEDReader extends IlvRasterAbstractReader implements IlvPersistentObject
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);
needReload
Constructor and Description |
---|
IlvRasterDTEDReader()
Default constructor
|
IlvRasterDTEDReader(IlvInputStream stream)
Constructor from stream
|
Modifier and Type | Method and Description |
---|---|
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.
|
addRaster, computeGisImageBounds, computeLimits, createRasterTileLoader, dispose, getDefaultFeatureRenderer, getDefaultMaximumIntervalsForDeterminingImageLocation, getImageBounds, getImageCount, getInverseTransformation, getLowerRightCorner, getLowerRightCorner, getMaximumIntervalsForDeterminingImageLocation, getNextFeature, getRasterMappedBuffer, getRasterProperties, getTileLoader, getTileLoader, getTileLoaders, getTransformation, getUpperLeftCorner, getUpperLeftCorner, isForceImageLoadingWhenSaving, isGeoreferenced, isHighQualityRendering, isNeedReload, removeRaster, restart, setDefaultMaximumIntervalsForDeterminingImageLocation, setForceImageLoadingWhenSaving, setHighQualityRendering, setMaximumIntervalsForDeterminingImageLocation, setTransformation
public IlvRasterDTEDReader()
public IlvRasterDTEDReader(IlvInputStream stream) throws IlvReadFileException
stream
- IlvReadFileException
public void write(IlvOutputStream stream) throws IOException
write
in interface IlvPersistentObject
write
in class IlvRasterAbstractReader
stream
- The output stream.IOException
- thrown when an exception occurs during
the write operation for this object.public boolean addMap(String fileName) throws IOException
fileName
- Path pointing to one of the DTED files (.dt0,.dt1,.dt2)true
.
The color model is built through the use of a { @link IlvRasterElevationColorModelFactory}IOException
- if the fileName
is an unrecognized file.public boolean addMap(URL url) throws IOException
url
- URL pointing to one of the DTED files (.dt0,.dt1,.dt2)true
.IOException
- if the url
is an unrecognized file.public void reload(IlvThreadMonitoringData monitorInfo)
IlvRasterProperties
of the reader as they
might not be saved when the theme only is saved.reload
in class IlvRasterAbstractReader
monitorInfo
- Used to update task progress.public IlvCoordinateSystem getCoordinateSystem()
getCoordinateSystem
in interface IlvMapFeatureIterator
null
if the coordinate system is unknown.IlvMapFeatureIterator.getCoordinateSystem()
public IlvMathTransform getInternalTransformation(int imageIndex)
getInternalTransformation
in class IlvRasterAbstractReader
imageIndex
- The index of the raster.IlvRasterAbstractReader.getInternalTransformation(int)
public IlvFeatureAttributeProperty getProperties(int imageIndex)
getProperties
in class IlvRasterAbstractReader
imageIndex
- The index of the image.IlvRasterAbstractReader.getProperties(int)
© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.