public class TLcdDTEDTileDecoder extends ALcdTileDecoder implements ILcdTileDecoder
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.
Modifier and Type | Field and Description |
---|---|
static int |
AVERAGE
The sampling strategy that returns the average value of the corners of
each DTED sample cell.
|
static int |
EXTENDED
The sampling strategy that returns all values of the DTED tile, including
the extra last row and the last column.
|
static int |
MAXIMUM
The sampling strategy that returns the maximum value of the corners of
each DTED sample cell.
|
static int |
MINIMUM
The sampling strategy that returns the minimum value of the corners of
each DTED sample cell.
|
static int |
NORTH_EAST_CORNER
The sampling strategy that returns the North-East corner of each DTED
sample cell.
|
static int |
NORTH_WEST_CORNER
The sampling strategy that returns the North-West corner of each DTED
sample cell.
|
static int |
SOUTH_EAST_CORNER
The sampling strategy that returns the South-East corner of each DTED
sample cell.
|
static int |
SOUTH_WEST_CORNER
The sampling strategy that returns the South-West corner of each DTED
sample cell.
|
static int |
UNKNOWN_ELEVATION
The tile value for unknown elevations.
|
Constructor and Description |
---|
TLcdDTEDTileDecoder()
Creates a new TLcdDTEDTileDecoder with the default sample strategy.
|
TLcdDTEDTileDecoder(int aSampleStrategy)
Creates a new TLcdDTEDTileDecoder with the given sample strategy.
|
Modifier and Type | Method and Description |
---|---|
static int |
getDefaultSampleStrategy()
Returns the default sample strategy.
|
int |
getSampleStrategy()
Returns the sample strategy.
|
boolean |
isTraceOn()
Deprecated.
This method has been deprecated. It is recommended to use the
standard Java logging framework directly.
|
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. It is recommended to use the
standard Java logging framework directly.
|
getInputStreamFactory, readTile, readTile, setClassTraceOn, setInputStreamFactory
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
readTile, readTile
public static final int UNKNOWN_ELEVATION
public static final int NORTH_WEST_CORNER
public static final int SOUTH_WEST_CORNER
public static final int NORTH_EAST_CORNER
public static final int SOUTH_EAST_CORNER
public static final int MINIMUM
public static final int MAXIMUM
public static final int AVERAGE
public static final int EXTENDED
public TLcdDTEDTileDecoder()
setDefaultSampleStrategy(int)
public TLcdDTEDTileDecoder(int aSampleStrategy)
setSampleStrategy(int)
public void setTraceOn(boolean aTraceOn)
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.setTraceOn
in class ALcdTileDecoder
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.public boolean isTraceOn()
true
if tracing is enabled for this class.isTraceOn
in class ALcdTileDecoder
public static void setDefaultSampleStrategy(int aDefaultSampleStrategy)
The default value is NORTH_WEST_CORNER
.
aDefaultSampleStrategy
- one of
NORTH_WEST_CORNER
,
SOUTH_WEST_CORNER
,
NORTH_EAST_CORNER
,
SOUTH_EAST_CORNER
,
MINIMUM
,
MAXIMUM
, or
AVERAGE
.public static int getDefaultSampleStrategy()
setDefaultSampleStrategy(int)
public void setSampleStrategy(int aSampleStrategy)
aSampleStrategy
- one of
NORTH_WEST_CORNER
,
SOUTH_WEST_CORNER
,
NORTH_EAST_CORNER
,
SOUTH_EAST_CORNER
,
MINIMUM
,
MAXIMUM
,
AVERAGE
, or
EXTENDED
.setDefaultSampleStrategy(int)
public int getSampleStrategy()
setSampleStrategy(int)
protected ILcdTileInfo readTileFromStream(InputStream aInputStream, int aImageIndex, int aSubTileWidth, int aSubTileHeight, int aSubTileRowIndex, int aSubTileColumnIndex, ILcdBuffer aBuffer) throws TLcdCodecException
ALcdTileDecoder
readTileFromStream
in class ALcdTileDecoder
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.ILcdTileInfo
information about the decoded tile.TLcdCodecException
- in case of decoding problems.