Class TLcdRaster

java.lang.Object
com.luciad.format.raster.ALcdRaster
com.luciad.format.raster.TLcdRaster
All Implemented Interfaces:
ILcdRaster, ILcdBounded, ILcdCache, ILcdDisposable, AutoCloseable
Direct Known Subclasses:
TLcdInterpolatedRaster

public class TLcdRaster extends ALcdRaster
Important notice: the package com.luciad.imaging presents a new API for the modeling of raster data. For new projects, it is recommended to use this API instead of ILcdRaster et al. This class provides a straightforward implementation of ILcdRaster.

This class is thread-safe for concurrent read-only access of its contents.

  • Constructor Details

    • TLcdRaster

      public TLcdRaster()
      Creates a new empty TLcdRaster.
    • TLcdRaster

      public TLcdRaster(ILcdBounds aBounds, ILcdTile[][] aTiles, double aPixelDensity, int aDefaultValue, ColorModel aColorModel)
      Creates a new TLcdRaster with a regular tiling.
      Parameters:
      aBounds - the bounds of the raster in model coordinates.
      aTiles - the array of tiles of the raster.
      aPixelDensity - an estimate of the number of pixels per unit area in model coordinates.
      aDefaultValue - a default value in case the raster cannot resolve a point.
      aColorModel - an optional ColorModel that overrides the ColorModel of the raster's tiles.
    • TLcdRaster

      public TLcdRaster(ILcdBounds aBounds, double aTileWidth, double aTileHeight, ILcdTile[][] aTiles, double aPixelDensity, int aDefaultValue, ColorModel aColorModel)
      Creates a new TLcdRaster. The tiling is regular, except possibly for the tiles in the right-most column and in the bottom row. If the sums of the tile widths and the tile heights extend beyond the bounds of the raster, the extending parts are considered to be padding and they are ignored.

      For a raster with a uniform pixel density, the tile width (and similarly the tile height) in model coordinates can be computed as follows:

      <tile width> = <tile width in pixels> / <raster width in pixels> * <raster width>

      Parameters:
      aBounds - the bounds of the raster in model coordinates.
      aTileWidth - the width of the tiles in model coordinates.
      aTileHeight - the height of the tiles in model coordinates.
      aTiles - the array of tiles of the raster.
      aPixelDensity - an estimate of the number of pixels per unit area in model coordinates.
      aDefaultValue - a default value in case the raster cannot resolve a point.
      aColorModel - an optional ColorModel that overrides the ColorModel of the raster's tiles.
  • Method Details

    • getTileRowCount

      public int getTileRowCount()
      Description copied from interface: ILcdRaster
      Returns the number of the tile rows in the raster.
    • getTileColumnCount

      public int getTileColumnCount()
      Description copied from interface: ILcdRaster
      Returns the number of the tile columns in the raster.
    • retrieveTile

      public ILcdTile retrieveTile(int aRow, int aColumn)
      Description copied from interface: ILcdRaster
      Retrieves the specified tile.
      Parameters:
      aRow - the row number of the tile in the grid of tiles, ranging between 0 and the number of rows minus 1.
      aColumn - the column number of the tile in the grid of tiles, ranging between 0 and the number of columns minus 1.
      Returns:
      the specified tile.