Class ALcdEarthTileCombiner

java.lang.Object
com.luciad.earth.metadata.preprocessor.combiner.ALcdEarthTileCombiner
All Implemented Interfaces:
ILcdEarthTileCombiner
Direct Known Subclasses:
TLcdEarthElevationDataCombiner, TLcdEarthImageCombiner, TLcdEarthTerrainTileVertexArrayCombiner

public abstract class ALcdEarthTileCombiner extends Object implements ILcdEarthTileCombiner
Base class for ILcdEarthTileCombiner implementations. Derived classes need only implement the abstract combineTileData() method, which combines the data objects of four input tiles. Creating a new tile, with the appropriate properties and containing the combined data, is handled by this class.

By default, combineTiles() returns instances of TLcdEarthTile. This behaviour can be changed by overriding createCombinedTile().

Since:
8.2
  • Constructor Details

    • ALcdEarthTileCombiner

      protected ALcdEarthTileCombiner()
      Constructs a new ALcdEarthTileCombiner.
  • Method Details

    • combineTileData

      public abstract Object combineTileData(ALcdEarthTile[][] aInputTiles, Object[][] aInputData)
      Combines the data present in the four input tiles. Returns a new data object to be contained in the result of combineTiles().
      Parameters:
      aInputTiles - the four source tiles
      aInputData - the data objects of four source tiles
      Returns:
      a new data object for the combined tiles
      Throws:
      IllegalArgumentException - if the data cannot be combined
    • combineTiles

      public ALcdEarthTile combineTiles(ALcdEarthTile[][] aInputs)
      Combines four tiles into one. All properties of the tile are set in this method, except for the tile's actual data. This is created by calling combineTileData(), with the data objects of the four source tiles as an argument.

      The returned tile is instantiated using the method createCombinedTile().

      Specified by:
      combineTiles in interface ILcdEarthTileCombiner
      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
    • createCombinedTile

      protected ALcdEarthTile createCombinedTile(ILcd3DEditableBounds aCombinedBounds, Object aCombinedData, int aLevel, long aX, long aY, ILcdEarthTileSetCoverage aCoverage, ILcdGeoReference aGeoreference, TLcdEarthTileFormat aFormat)
      Returns a new TLcdEarthTile with the given properties. This method can be overridden if some other implementation of ALcdEarthTile is needed.
      Parameters:
      aCombinedBounds - the bounds of the new tile
      aCombinedData - the data of the new tile
      aLevel - the level of the new tile
      aX - the column index of the new tile
      aY - the row index of the new tile
      aCoverage - the coverage of the new tile
      aGeoreference - the georeference of the new tile
      aFormat - the data format of the new tile
      Returns:
      a new tile with the specified properties
    • combineTiles

      public ALcdEarthTile combineTiles(ALcdEarthTile[][] aInputs, ALcdEarthTile[] aContext)
      The default implementation of this method simply calls combineTiles(com.luciad.earth.tileset.ALcdEarthTile[][]), ignoring the tiles passed in aContext.
      Specified by:
      combineTiles in interface ILcdEarthTileCombiner
      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