Class ALcdImageMosaic.Configuration

java.lang.Object
com.luciad.imaging.ALcdImage.Configuration
com.luciad.imaging.ALcdImageMosaic.Configuration
Enclosing class:
ALcdImageMosaic

public static class ALcdImageMosaic.Configuration extends ALcdImage.Configuration
Describes the configuration of an ALcdImageMosaic. Image configurations can be created using the supplied ALcdImageMosaic.Configuration.Builder.

The key properties of an image mosaic are:

  • Semantics: describe the image's pixel interpretation and format.
  • Image Reference: the image's model reference.
  • Bounds: the image's extents in geographic coordinates.
  • Grid Bounds: the image's grid extents in geographic coordinates.
  • Column Count: the number of tiles in this mosaic along the x axis
  • Row Count: the number of tiles in this mosaic along the x axis
  • Pixel Size X: the approximate size of a pixel of the mosaic along the x axis, measured in model coordinates.
  • Pixel Size Y: the approximate size of a pixel of the mosaic along the y axis, measured in model coordinates.
Since:
2014.0
  • Method Details

    • getColumnCount

      public long getColumnCount()
      Returns the number of tiles in this mosaic along the x axis.

      This is also referred to as the number of tile columns.

      Returns:
      the number of tile along the x direction.
    • getRowCount

      public long getRowCount()
      Returns the number of tiles in this mosaic along the y axis.

      This is also referred to as the number of tile rows.

      Returns:
      the number of tiles along the y direction
    • getColumnWidth

      public final double getColumnWidth()
      Returns the width of a single tile in model coordinates.

      Note that the tiles in the first and last column may be smaller as indicated by getTileGridBounds(). You can use getColumnWidth(long) to conveniently compute the width of a particular column.

      Returns:
      the width of a single tile in model coordinates
      See Also:
    • getRowHeight

      public final double getRowHeight()
      Returns the height of a single tile in model coordinates.

      Note that the tiles in the first and last row may be smaller as indicated by getTileGridBounds(). You can use getRowHeight(long) to conveniently compute the height of a particular row.

      Returns:
      the height of a single tile in model coordinates
    • getColumnWidth

      public final double getColumnWidth(long aColumn)
      Returns the width of a single tile in a particular column in model coordinates.

      The width of a column is:

      • first: columnWidth - (bounds.minX - tileGridBounds.minX)
      • last: columnWidth - (tileGridBounds.maxX - bounds.maxX)
      • others: columnWidth
      Parameters:
      aColumn - the column in [0, getColumnCount[
      Returns:
      the width of a single tile in model coordinates
      See Also:
    • getRowHeight

      public final double getRowHeight(long aRow)
      Returns the height of a single tile in a particular row in model coordinates.

      The height of a row is:

      • first: rowHeight - (bounds.minY - tileGridBounds.minY)
      • last: rowHeight - (tileGridBounds.maxY - bounds.maxY)
      • others: rowHeight
      Returns:
      the height of a single tile in model coordinates
      See Also:
    • getPixelSizeX

      public double getPixelSizeX()
      Returns the approximate size of a pixel of the mosaic along the x axis, measured in model coordinates. The actual size of a pixel of the mosaic may vary, as not all tiles are required to have the same pixel resolution.
      Returns:
      the horizontal pixel size of the mosaic
    • getPixelSizeY

      public double getPixelSizeY()
      Returns the approximate size of a pixel of the mosaic along the y axis, measured in model coordinates. The actual size of a pixel of the mosaic may vary, as not all tiles are required to have the same pixel resolution.
      Returns:
      the vertical pixel size of the mosaic
    • getSamplingMode

      public ELcdImageSamplingMode getSamplingMode()
      Returns the sampling mode of the image.

      All tiles of the mosaic use this sampling mode.

      Returns:
      the sampling mode
    • getTileGridBounds

      public ILcdBounds getTileGridBounds()
      Returns the tile grid bounds of this image.

      The tile grid bounds are the bounds of the uniform tile grid associated with this mosaic. The geographic bounds on the other hand indicate the bounds of all tiles in the mosaic. Typically they are exactly the same (e.g. all tiles cover the same geographic area in model units). For some formats (for example CADRG) the tiles at the edges can be smaller than other tiles. In that case the uniform tile grid is larger than the geographic bounds (e.g. the tile grid has some padding w.r.t. the geographic bounds).

      The tile grid bounds always fully contain the geographic bounds, but may be larger. A larger tile grid bounds indicates that some tiles at the edges of the mosaic are (geographically) smaller then other tiles. The tile grid bounds always covers exactly an area of getColumnWidth() by getRowHeight(). Hence, the width of the tile grid bounds is getColumnWidth() * getColumnCount() and its height is getRowHeight() * getRowCount().

      As an example, consider a mosaic which covers the entire world with tiles that have a geographical area of 25 x 25 degrees. Such a mosaic would need 15 x 12 tiles. However, the last column of tiles would extend 15 degrees beyond the edge of the map (15 colums x 25 degrees = 375 degrees). In this case, the tile grid bounds would have a width of 375, but the mosaic's main bounds would be clamped to 360 degrees wide. This discrepancy can alert clients (e.g. painters) that the last column needs to be handled differently from the others.

      You can use getColumnWidth(long) and getRowHeight(long) to conveniently compute the width or height of a particular row or column.

      Returns:
      the tile grid bounds
    • asBuilder

      Creates a builder which is pre-initialized with the properties of this Configuration. This allows the user to create a copy of a configuration and selectively modify properties.
      Returns:
      a builder initialized with the properties of this Configuration
    • newBuilder

      public static ALcdImageMosaic.Configuration.Builder newBuilder()
      Creates a new builder which can be used to create Configuration objects.
      Returns:
      a new configuration builder
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class ALcdImage.Configuration
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class ALcdImage.Configuration