Interface ILcdEarthTileDataCodec
- All Known Implementing Classes:
TLcdEarthCompressorTileDataCodec
,TLcdEarthElevationDataTileDataCodec
,TLcdEarthImageTileDataCodec
,TLcdEarthIndexedVertexArrayTileDataCodec
,TLcdEarthSeparateAlphaImageTileDataCodec
,TLcdEarthTerrainTileVertexArrayTileDataCodec
,TLcdEarthTextureDataTileDataCodec
,TLcdEarthTexturedTerrainTileVertexArrayTileDataCodec
,TLcdEarthTexturedVertexArrayTileDataCodec
,TLcdEarthVertexArrayTileDataCodec
public interface ILcdEarthTileDataCodec
Encodes and decodes tile data. Tile data codecs are used to read or write
the result of
ALcdEarthTile.getData()
from
or to a TLcdEarthTileRepository
.- Since:
- 8.2
-
Method Summary
Modifier and TypeMethodDescriptiondecodeTileData
(InputStream aSource) Decodes tile data from the given input stream.default void
encodeTile
(ALcdEarthTile aTile, OutputStream aDestination) Encodes a tile to the given output stream.void
encodeTileData
(Object aTileData, OutputStream aDestination) Encodes tile data to the given output stream.Returns the tile data format that this codec can encode or decode.Returns the format in which this codec encodes data.
-
Method Details
-
decodeTileData
Decodes tile data from the given input stream. The return value of this method must be an object of the type returned bygetDecodedTileFormat()
.- Parameters:
aSource
- the input stream from which to read the tile data- Returns:
- the decoded tile data
- Throws:
IOException
- if the tile data cannot be decoded
-
encodeTileData
Encodes tile data to the given output stream. TheaTileData
parameter must be an object of the type returned bygetDecodedTileFormat()
.- Parameters:
aTileData
- the tile data to be encodedaDestination
- the output stream to which to encode the tile data- Throws:
IOException
- if the tile data cannot be encoded
-
encodeTile
Encodes a tile to the given output stream. The data property value on theaTile
parameter must contain an object of the type returned bygetDecodedTileFormat()
. By default, this method delegates toencodeTileData(Object, OutputStream)
.- Parameters:
aTile
- the tile to be encodedaDestination
- the output stream to which to encode the tile data- Throws:
IOException
- if the tile cannot be encoded- Since:
- 2018.0
-
getDecodedTileFormat
TLcdEarthTileFormat getDecodedTileFormat()Returns the tile data format that this codec can encode or decode. TheaTile
parameter ofencodeTileData()
should always be of this type, as should the return value ofdecodeTileData()
.- Returns:
- the format of the tile data type that this codec can encode or decode
-
getEncodedDataFormat
TLcdEarthTileFormat getEncodedDataFormat()Returns the format in which this codec encodes data. An example could be "JPEG" or "PNG" for image data. The format is used in conjunction withgetDecodedTileFormat()
to retrieve an appropriate tile data codec for any particular tile.- Returns:
- a format in which this codec encodes data
-