Class ALcdImageMosaic

All Implemented Interfaces:
Direct Known Subclasses:
TLcdCADRGRaster, TLcdGeoSPOTRaster

public abstract class ALcdImageMosaic extends ALcdImage
A mosaic is a grid of ALcdBasicImages. Each image in the grid is called a tile. Some important properties of a mosaic are:
  • sparseness: some tiles must not be present
  • variable resolution: tiles may have different pixel resolutions

The mosaic has geographical bounds and the individual tiles are ordered as in the model reference:

  • the tile at coordinate (0,0) is located at the bounds's location (e.g. the lower-left corner of the bounds)
  • the tile x coordinates increase along the positive x axis of the bounds
  • the tile y coordinates increase along the positive y axis of the bounds
Note that the pixels in an ALcdBasicImage are ordered in the opposite direction vertically.

All tiles cover a geographic area of the same size, except for the first and last tile rows and columns. This is indicated by ALcdImageMosaic.Configuration.getTileGridBounds().

The following image shows a 2x2 area-sampled mosaic image. The tile (0,0) is in the lower-left corner. It is sparse because the tile (1,0) is missing. It has variable resolution because the tiles have a different number of pixels.

A mosaic image

You can obtain an image mosaic from one of the model decoders, by implementing this interface or by using one of the available builders:

  • Constructor Details

    • ALcdImageMosaic

      protected ALcdImageMosaic()
      Default constructor.
  • Method Details

    • getTile

      public abstract ALcdBasicImage getTile(long aTileX, long aTileY)
      Returns a single tile from this image. May return null if no data is available. If the supplied sampling parameters allow it, however, the image may also create a new tile by extrapolating data from other levels of detail.

      Note that this method may require costly IO. Even if data is loaded lazily then some IO may still be required to determine if the tile exists or not. So typically this method should not be invoked from the paint thread. Also note that a mosaic may contain many tiles (ex. millions) so iterating over all tiles may take a very long time.

      aTileX - the tile x coordinate in [0, getConfiguration().getColumnCount()[
      aTileY - the tile y coordinate in [0, getConfiguration().getRowCount()[
      the tile or null
    • getConfiguration

      public abstract ALcdImageMosaic.Configuration getConfiguration()
      Returns an image configuration object describing the properties of this image mosaic's data.
      Specified by:
      getConfiguration in class ALcdImage
      the image's configuration