ilog.views.maps.format.dem
Class IlvGTopo30Reader

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

public class IlvGTopo30Reader
extends IlvRasterAbstractReader

Reader of GTOPO30 images. Example of use:

 IlvGTopo30Reader r = new IlvGTopo30Reader();
 r.addMap(fileName);
 

Since:
JViews 7.5

Field Summary
 
Fields inherited from class ilog.views.maps.raster.IlvRasterAbstractReader
needReload
 
Constructor Summary
IlvGTopo30Reader()
          Creates a new instance of IlvGTopo30Reader.
IlvGTopo30Reader(IlvInputStream stream)
          Creates a IlvGTopo30Reader from an IlvInputStream
 
Method Summary
 void addMap(String filename)
          Adds a new GTOPO30 image.
 void addMap(URL url)
          Adds a new GTOPO30 image specified by an URL.
 IlvCoordinateSystem getCoordinateSystem()
          Returns IlvGeographicCoordinateSystem.WGS84
 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 (the number of images 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

IlvGTopo30Reader

public IlvGTopo30Reader()
Creates a new instance of IlvGTopo30Reader.


IlvGTopo30Reader

public IlvGTopo30Reader(IlvInputStream stream)
                 throws IlvReadFileException
Creates a IlvGTopo30Reader from an IlvInputStream

Parameters:
stream - The stream to read from.
Throws:
IlvReadFileException - if an exception occurs.
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.

reload

public void reload(IlvThreadMonitoringData monitorInfo)
Given the state of the reader (the number of images 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.

addMap

public void addMap(String filename)
            throws IOException
Adds a new GTOPO30 image.

Parameters:
filename - Path pointing to one of the GTopo30 files (.dem, .hdr, .src, .sch, .stx). The color model is built through the use of a { @link IlvRasterElevationColorModelFactory}
Throws:
IOException - if the fileName is an unrecognized file.

addMap

public void addMap(URL url)
            throws IOException
Adds a new GTOPO30 image specified by an URL.

Parameters:
url - URL pointing to one of the GTopo30 files (.dem, .hdr, .src, .sch, .stx). The color model is built through the use of a { @link IlvRasterElevationColorModelFactory}
Throws:
IOException - if the url is an unrecognized URL.
Since:
JViews 7.5

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)

getCoordinateSystem

public IlvCoordinateSystem getCoordinateSystem()
Returns IlvGeographicCoordinateSystem.WGS84

Returns:
the WGS84 coordinate system.
See Also:
IlvMapFeatureIterator.getCoordinateSystem()

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.