Class TLcdDTEDTileDecoder

java.lang.Object
com.luciad.format.raster.ALcdTileDecoder
com.luciad.format.raster.TLcdDTEDTileDecoder
All Implemented Interfaces:
ILcdTileDecoder, ILcdInputStreamFactoryCapable

public class TLcdDTEDTileDecoder extends ALcdTileDecoder implements ILcdTileDecoder
This ILcdTileDecoder decodes 1° by 1° DTED cells of any level (0, 1, or 2). By default, one DTED sample value corresponds to one tile value. The last row and column of DTED samples that are duplicates of rows and columns in neighboring cells are discarded. These behaviors can be changed by setting the sampling strategy.

This class is thread-safe.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    The sampling strategy that returns the average value of the corners of each DTED sample cell.
    static final int
    The sampling strategy that returns all values of the DTED tile, including the extra last row and the last column.
    static final int
    The sampling strategy that returns the maximum value of the corners of each DTED sample cell.
    static final int
    The sampling strategy that returns the minimum value of the corners of each DTED sample cell.
    static final int
    The sampling strategy that returns the North-East corner of each DTED sample cell.
    static final int
    The sampling strategy that returns the North-West corner of each DTED sample cell.
    static final int
    The sampling strategy that returns the South-East corner of each DTED sample cell.
    static final int
    The sampling strategy that returns the South-West corner of each DTED sample cell.
    static final int
    The tile value for unknown elevations.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new TLcdDTEDTileDecoder with the default sample strategy.
    TLcdDTEDTileDecoder(int aSampleStrategy)
    Creates a new TLcdDTEDTileDecoder with the given sample strategy.
  • Method Summary

    Modifier and Type
    Method
    Description
    static int
    Returns the default sample strategy.
    int
    Returns the sample strategy.
    boolean
    Deprecated.
    This method has been deprecated.
    protected ILcdTileInfo
    readTileFromStream(InputStream aInputStream, int aImageIndex, int aSubTileWidth, int aSubTileHeight, int aSubTileRowIndex, int aSubTileColumnIndex, ILcdBuffer aBuffer)
    Reads a sub-tile from an input stream.
    static void
    setDefaultSampleStrategy(int aDefaultSampleStrategy)
    Sets the sample strategy that is used by default for new tile decoders.
    void
    setSampleStrategy(int aSampleStrategy)
    Sets the sample strategy.
    void
    setTraceOn(boolean aTraceOn)
    Deprecated.
    This method has been deprecated.

    Methods inherited from class com.luciad.format.raster.ALcdTileDecoder

    getInputStreamFactory, readTile, readTile, setClassTraceOn, setInputStreamFactory

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.luciad.format.raster.ILcdTileDecoder

    readTile, readTile
  • Field Details

    • UNKNOWN_ELEVATION

      public static final int UNKNOWN_ELEVATION
      The tile value for unknown elevations.
      See Also:
    • NORTH_WEST_CORNER

      public static final int NORTH_WEST_CORNER
      The sampling strategy that returns the North-West corner of each DTED sample cell.
      See Also:
    • SOUTH_WEST_CORNER

      public static final int SOUTH_WEST_CORNER
      The sampling strategy that returns the South-West corner of each DTED sample cell.
      See Also:
    • NORTH_EAST_CORNER

      public static final int NORTH_EAST_CORNER
      The sampling strategy that returns the North-East corner of each DTED sample cell.
      See Also:
    • SOUTH_EAST_CORNER

      public static final int SOUTH_EAST_CORNER
      The sampling strategy that returns the South-East corner of each DTED sample cell.
      See Also:
    • MINIMUM

      public static final int MINIMUM
      The sampling strategy that returns the minimum value of the corners of each DTED sample cell.
      See Also:
    • MAXIMUM

      public static final int MAXIMUM
      The sampling strategy that returns the maximum value of the corners of each DTED sample cell.
      See Also:
    • AVERAGE

      public static final int AVERAGE
      The sampling strategy that returns the average value of the corners of each DTED sample cell.
      See Also:
    • EXTENDED

      public static final int EXTENDED
      The sampling strategy that returns all values of the DTED tile, including the extra last row and the last column. This row and column are generally duplicated from neighboring tiles. This strategy is useful in other cases, or for performing bilinear interpolation externally.
      See Also:
  • Constructor Details

    • TLcdDTEDTileDecoder

      public TLcdDTEDTileDecoder()
      Creates a new TLcdDTEDTileDecoder with the default sample strategy.
      See Also:
    • TLcdDTEDTileDecoder

      public TLcdDTEDTileDecoder(int aSampleStrategy)
      Creates a new TLcdDTEDTileDecoder with the given sample strategy.
      See Also:
  • Method Details

    • setTraceOn

      public void setTraceOn(boolean aTraceOn)
      Deprecated.
      This method has been deprecated. It is recommended to use the standard Java logging framework directly.
      Enables tracing for this class instance. Calling this method with either true or false as argument automatically turns off tracing for all other class instances for which setTraceOn has not been called. If the argument is false then only the informative, warning and error log messages are recorded.
      Overrides:
      setTraceOn in class ALcdTileDecoder
      Parameters:
      aTraceOn - if true then all log messages are recorded for this instance. If false, then only the informative, warning and error log messages are recorded.
    • isTraceOn

      public boolean isTraceOn()
      Deprecated.
      This method has been deprecated. It is recommended to use the standard Java logging framework directly.
      Returns true if tracing is enabled for this class.
      Overrides:
      isTraceOn in class ALcdTileDecoder
      Returns:
      true if tracing is enabled for this class, false otherwise.
    • setDefaultSampleStrategy

      public static void setDefaultSampleStrategy(int aDefaultSampleStrategy)
      Sets the sample strategy that is used by default for new tile decoders. DTED cells contain discrete sample points at the corners of each of the pixels in a cell. The sample strategy determines which DTED corner sample is used to assign a value to each raster pixel, when decoding DTED cells. It thus also determines the sides of the DTED cells at which the duplicate row and column of samples are discarded.

      The default value is NORTH_WEST_CORNER.

      Parameters:
      aDefaultSampleStrategy - one of NORTH_WEST_CORNER, SOUTH_WEST_CORNER, NORTH_EAST_CORNER, SOUTH_EAST_CORNER, MINIMUM, MAXIMUM, or AVERAGE.
    • getDefaultSampleStrategy

      public static int getDefaultSampleStrategy()
      Returns the default sample strategy.
      See Also:
    • setSampleStrategy

      public void setSampleStrategy(int aSampleStrategy)
      Sets the sample strategy.
      Parameters:
      aSampleStrategy - one of NORTH_WEST_CORNER, SOUTH_WEST_CORNER, NORTH_EAST_CORNER, SOUTH_EAST_CORNER, MINIMUM, MAXIMUM, AVERAGE, or EXTENDED.
      See Also:
    • getSampleStrategy

      public int getSampleStrategy()
      Returns the sample strategy.
      See Also:
    • readTileFromStream

      protected ILcdTileInfo readTileFromStream(InputStream aInputStream, int aImageIndex, int aSubTileWidth, int aSubTileHeight, int aSubTileRowIndex, int aSubTileColumnIndex, ILcdBuffer aBuffer) throws TLcdCodecException
      Description copied from class: ALcdTileDecoder
      Reads a sub-tile from an input stream.
      Specified by:
      readTileFromStream in class ALcdTileDecoder
      Parameters:
      aInputStream - the input stream from which the tile data can be read.
      aImageIndex - the index of the tile in the given input stream (if applicable).
      aSubTileWidth - the width of the sub-tiles, expressed in pixels.
      aSubTileHeight - the height of the sub-tiles, expressed in pixels.
      aSubTileRowIndex - the row number of the sub-tile to be decoded.
      aSubTileColumnIndex - the column number of the sub-tile to be decoded.
      aBuffer - the buffer in which the decoded bytes will be stored.
      Returns:
      ILcdTileInfo information about the decoded tile.
      Throws:
      TLcdCodecException - in case of decoding problems.