ilog.views.maps.format.dted
Class IlvDTEDReader

java.lang.Object
  extended by ilog.views.maps.format.dted.IlvDTEDReader
All Implemented Interfaces:
IlvMapFeatureIterator

public class IlvDTEDReader
extends Object
implements IlvMapFeatureIterator

This class can be used to read DTED files.
The Digital Terrain Elevation Data (DTED) format is a map format for representing terrain elevations, which is published by the US National Imagery and Mapping Agency (NIMA).

This reader produces only one map feature which is an IlvMapRaster.

The DTED reader provided in this package is based on the specification document MIL-PRF-89020A of 19 April 1996.

DTED files are available with various precision levels: DTED0, DTED1 and DTED2, with DTED2 offering the greatest precision.

Since:
ILOG JViews 3.0, ILOG JViews 3.0
See Also:
IlvMapRaster, IlvDefaultRasterRenderer

Constructor Summary
IlvDTEDReader(DataInput dataInput)
          Creates an instance of the DTED reader from a DataInput.
IlvDTEDReader(String fileName)
          Creates an instance of the DTED reader for the specified file name.
IlvDTEDReader(URL url)
          Creates an instance of the DTED reader for the specified URL.
 
Method Summary
 void dispose()
          Releases the resources allocated to the reader.
 void finalize()
          Is called by the Java Garbage Collector to release the resources allocated to the reader.
protected  int getColumnCount()
          Returns the number of columns of the data.
 IlvCoordinateSystem getCoordinateSystem()
          Returns the spatial reference system that describes the coordinate system of geometric coordinates of the map features.
 IlvFeatureRenderer getDefaultFeatureRenderer()
          Returns an instance of IlvDefaultFeatureRenderer.
 IlvCoordinate getLowerRightCorner()
          Returns the coordinates of the lower-right corner of the DTED raster image.
 short getMaxElevation()
          Returns the highest elevation.
 short getMinElevation()
          Returns the lowest elevation.
 IlvMapFeature getNextFeature()
          Returns the raster of elevations.
protected  int getRowCount()
          Returns the number of rows of the data.
 IlvCoordinate getUpperLeftCorner()
          Returns the coordinates of the upper-left corner of the DTED raster image.
 boolean isGeoreferenced()
          Returns true because this format is a georeferenced format.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IlvDTEDReader

public IlvDTEDReader(String fileName)
              throws IOException,
                     IlvMapFormatException,
                     FileNotFoundException
Creates an instance of the DTED reader for the specified file name.

Parameters:
fileName - The name of the DTED file to be read.
Throws:
FileNotFoundException - if the file does not exist.
IlvMapFormatException - if there is a format error.
IOException - if an IO error occurs.

IlvDTEDReader

public IlvDTEDReader(URL url)
              throws IOException,
                     IlvMapFormatException
Creates an instance of the DTED reader for the specified URL.

Parameters:
url - The URL of the DTED file to be read.
Throws:
IlvMapFormatException - if there is a format error.
IOException - if an IO error occurs.

IlvDTEDReader

public IlvDTEDReader(DataInput dataInput)
              throws IOException,
                     IlvMapFormatException
Creates an instance of the DTED reader from a DataInput.

Parameters:
dataInput - A data input opened on a DTED file.
Throws:
IlvMapFormatException - if there is a format error.
IOException - if an IO error occurs.
Method Detail

getMaxElevation

public short getMaxElevation()
Returns the highest elevation.


getMinElevation

public short getMinElevation()
Returns the lowest elevation.


getColumnCount

protected int getColumnCount()
Returns the number of columns of the data.

Returns:
Returns the number of columns of the data.
Since:
JViews 7.5

getRowCount

protected int getRowCount()
Returns the number of rows of the data.

Returns:
Returns the number of rows of the data.
Since:
JViews 7.5

dispose

public void dispose()
Releases the resources allocated to the reader. This method can be called several times, but only the first call actually frees the allocated resources.

Specified by:
dispose in interface IlvMapFeatureIterator

finalize

public void finalize()
Is called by the Java Garbage Collector to release the resources allocated to the reader. If the dispose method has not been called, it releases the resources used by the reader.

Overrides:
finalize in class Object
See Also:
dispose()

isGeoreferenced

public boolean isGeoreferenced()
Returns true because this format is a georeferenced format.

Specified by:
isGeoreferenced in interface IlvMapFeatureIterator

getCoordinateSystem

public IlvCoordinateSystem getCoordinateSystem()
Returns the spatial reference system that describes the coordinate system of geometric coordinates of the map features.

Specified by:
getCoordinateSystem in interface IlvMapFeatureIterator
Returns:
The coordinate system, or null if the coordinate system is unknown.
Since:
JViews 5.0

getUpperLeftCorner

public IlvCoordinate getUpperLeftCorner()
Returns the coordinates of the upper-left corner of the DTED raster image. These coordinates are expressed in the geographic projection.

Specified by:
getUpperLeftCorner in interface IlvMapFeatureIterator

getLowerRightCorner

public IlvCoordinate getLowerRightCorner()
Returns the coordinates of the lower-right corner of the DTED raster image. These coordinates are expressed in the geographic projection.

Specified by:
getLowerRightCorner in interface IlvMapFeatureIterator

getNextFeature

public IlvMapFeature getNextFeature()
                             throws IOException
Returns the raster of elevations. For the DTED reader, there is only one feature returned.

Specified by:
getNextFeature in interface IlvMapFeatureIterator
Throws:
IOException - when an error occurs while reading the data.
See Also:
IlvMapRaster

getDefaultFeatureRenderer

public IlvFeatureRenderer getDefaultFeatureRenderer()
Returns an instance of IlvDefaultFeatureRenderer.

Specified by:
getDefaultFeatureRenderer in interface IlvMapFeatureIterator


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