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 Details

    • decodeTileData

      Object decodeTileData(InputStream aSource) throws IOException
      Decodes tile data from the given input stream. The return value of this method must be an object of the type returned by getDecodedTileFormat().
      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

      void encodeTileData(Object aTileData, OutputStream aDestination) throws IOException
      Encodes tile data to the given output stream. The aTileData parameter must be an object of the type returned by getDecodedTileFormat().
      Parameters:
      aTileData - the tile data to be encoded
      aDestination - the output stream to which to encode the tile data
      Throws:
      IOException - if the tile data cannot be encoded
    • encodeTile

      default void encodeTile(ALcdEarthTile aTile, OutputStream aDestination) throws IOException
      Encodes a tile to the given output stream. The data property value on the aTile parameter must contain an object of the type returned by getDecodedTileFormat(). By default, this method delegates to encodeTileData(Object, OutputStream).
      Parameters:
      aTile - the tile to be encoded
      aDestination - 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. The aTile parameter of encodeTileData() should always be of this type, as should the return value of decodeTileData().
      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 with getDecodedTileFormat() to retrieve an appropriate tile data codec for any particular tile.
      Returns:
      a format in which this codec encodes data