Interface ILcdEarthTileCombiner

All Known Implementing Classes:
ALcdEarthTileCombiner, TLcdEarthElevationDataCombiner, TLcdEarthImageCombiner, TLcdEarthTerrainTileVertexArrayCombiner

public interface ILcdEarthTileCombiner
Combines four tiles on level N into a new tile on level N-1. To do this, the input tiles need to be scaled down and merged, so that the output tile has the same resolution as the individual source tiles.

As an example, if the source tiles contain images, an ILcdEarthTileCombiner would scale the four source images to half their width and height, and then draw each of these scaled images into a quadrant of a newly created image of the same size as the originals. The following figure illustrates this principle:

Example of tile combiner operation

The tile combiner mechanism is used by TLcdEarthTileRepositoryPreprocessor to create low-resolution tiles after obtaining the highest appropriate resolution from a tileset. This is typically faster than obtaining all tiles from the tileset, because the lower a tile's level, the more source assets will become involved in generating that tile.

Since:
8.2
  • Method Details

    • combineTiles

      ALcdEarthTile combineTiles(ALcdEarthTile[][] aInputs)
      Combines four tiles into one. Given four tiles of level N, this method returns the corresponding tile for level N-1.

      The tile matrix is composed as follows:

      [0][0] [1][0]
      [0][1] [1][1]
      Parameters:
      aInputs - 2x2 matrix of tiles of level N
      Returns:
      the corresponding tile for level N-1
      Throws:
      IllegalArgumentException - if the tiles cannot be combined
    • combineTiles

      ALcdEarthTile combineTiles(ALcdEarthTile[][] aInputs, ALcdEarthTile[] aContext)
      Combines four tiles into one. In addition to the four tiles that need to be combined, this method also takes an additional array of tiles that can be used as 'context' information. This array contains all tiles directly neighboring the four source tiles (i.e. an additional 12 tiles). If this method is called, aContext must not be null. If the neighboring tiles are not available, the application should call combineTiles(com.luciad.earth.tileset.ALcdEarthTile[][]) instead.
      Parameters:
      aInputs - 2x2 matrix of tiles of level N
      aContext - additional neighboring tiles that may be used by the combiner
      Returns:
      the corresponding tile for level N-1
      Throws:
      IllegalArgumentException - if the tiles cannot be combined
    • getDataFormat

      TLcdEarthTileFormat getDataFormat()
      Returns the type of data that can be combined by this combiner. The getData() methods of the four input tiles should all return an object of this format.
      Returns:
      the data format supported by this combiner