Package com.luciad.format.raster
Class TLcdDTEDTileDecoder
java.lang.Object
com.luciad.format.raster.ALcdTileDecoder
com.luciad.format.raster.TLcdDTEDTileDecoder
- All Implemented Interfaces:
ILcdTileDecoder,ILcdInputStreamFactoryCapable
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
FieldsModifier and TypeFieldDescriptionstatic final intThe sampling strategy that returns the average value of the corners of each DTED sample cell.static final intThe sampling strategy that returns all values of the DTED tile, including the extra last row and the last column.static final intThe sampling strategy that returns the maximum value of the corners of each DTED sample cell.static final intThe sampling strategy that returns the minimum value of the corners of each DTED sample cell.static final intThe sampling strategy that returns the North-East corner of each DTED sample cell.static final intThe sampling strategy that returns the North-West corner of each DTED sample cell.static final intThe sampling strategy that returns the South-East corner of each DTED sample cell.static final intThe sampling strategy that returns the South-West corner of each DTED sample cell.static final intThe tile value for unknown elevations. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new TLcdDTEDTileDecoder with the default sample strategy.TLcdDTEDTileDecoder(int aSampleStrategy) Creates a new TLcdDTEDTileDecoder with the given sample strategy. -
Method Summary
Modifier and TypeMethodDescriptionstatic intReturns the default sample strategy.intReturns the sample strategy.booleanDeprecated.This method has been deprecated.protected ILcdTileInforeadTileFromStream(InputStream aInputStream, int aImageIndex, int aSubTileWidth, int aSubTileHeight, int aSubTileRowIndex, int aSubTileColumnIndex, ILcdBuffer aBuffer) Reads a sub-tile from an input stream.static voidsetDefaultSampleStrategy(int aDefaultSampleStrategy) Sets the sample strategy that is used by default for new tile decoders.voidsetSampleStrategy(int aSampleStrategy) Sets the sample strategy.voidsetTraceOn(boolean aTraceOn) Deprecated.This method has been deprecated.Methods inherited from class com.luciad.format.raster.ALcdTileDecoder
getInputStreamFactory, readTile, readTile, setClassTraceOn, setInputStreamFactoryMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.luciad.format.raster.ILcdTileDecoder
readTile, readTile
-
Field Details
-
UNKNOWN_ELEVATION
public static final int UNKNOWN_ELEVATIONThe tile value for unknown elevations.- See Also:
-
NORTH_WEST_CORNER
public static final int NORTH_WEST_CORNERThe sampling strategy that returns the North-West corner of each DTED sample cell.- See Also:
-
SOUTH_WEST_CORNER
public static final int SOUTH_WEST_CORNERThe sampling strategy that returns the South-West corner of each DTED sample cell.- See Also:
-
NORTH_EAST_CORNER
public static final int NORTH_EAST_CORNERThe sampling strategy that returns the North-East corner of each DTED sample cell.- See Also:
-
SOUTH_EAST_CORNER
public static final int SOUTH_EAST_CORNERThe sampling strategy that returns the South-East corner of each DTED sample cell.- See Also:
-
MINIMUM
public static final int MINIMUMThe sampling strategy that returns the minimum value of the corners of each DTED sample cell.- See Also:
-
MAXIMUM
public static final int MAXIMUMThe sampling strategy that returns the maximum value of the corners of each DTED sample cell.- See Also:
-
AVERAGE
public static final int AVERAGEThe sampling strategy that returns the average value of the corners of each DTED sample cell.- See Also:
-
EXTENDED
public static final int EXTENDEDThe 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 eithertrueorfalseas argument automatically turns off tracing for all other class instances for whichsetTraceOnhas not been called. If the argument isfalsethen only the informative, warning and error log messages are recorded.- Overrides:
setTraceOnin classALcdTileDecoder- 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.Returnstrueif tracing is enabled for this class.- Overrides:
isTraceOnin classALcdTileDecoder- 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 ofNORTH_WEST_CORNER,SOUTH_WEST_CORNER,NORTH_EAST_CORNER,SOUTH_EAST_CORNER,MINIMUM,MAXIMUM, orAVERAGE.
-
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 ofNORTH_WEST_CORNER,SOUTH_WEST_CORNER,NORTH_EAST_CORNER,SOUTH_EAST_CORNER,MINIMUM,MAXIMUM,AVERAGE, orEXTENDED.- 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:ALcdTileDecoderReads a sub-tile from an input stream.- Specified by:
readTileFromStreamin classALcdTileDecoder- 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:
ILcdTileInfoinformation about the decoded tile.- Throws:
TLcdCodecException- in case of decoding problems.
-