Class DerivedGridCoverage

Direct Known Subclasses:
ConvertedGridCoverage, ResampledGridCoverage, TranslatedGridCoverage

abstract class DerivedGridCoverage extends GridCoverage
A grid coverage which is derived from a single source coverage, The default implementations of methods in this class assume that this derived coverage uses the same sample dimensions than the source coverage. If it is not the case, then some methods may need to be overridden.
Since:
1.3
Version:
1.3
  • Field Details

    • source

      protected final GridCoverage source
      The source grid coverage.
  • Constructor Details

    • DerivedGridCoverage

      DerivedGridCoverage(GridCoverage source, GridGeometry domain)
      Constructs a new grid coverage which is derived from the given source. The new grid coverage share the same sample dimensions than the source.
      Parameters:
      source - the source from which to copy the sample dimensions.
      domain - the grid extent, CRS and conversion from cell indices to CRS.
    • DerivedGridCoverage

      DerivedGridCoverage(GridCoverage source, List<? extends SampleDimension> ranges)
      Constructs a new grid coverage which is derived from the given source. The new grid coverage share the same grid geometry than the source. Subclasses which use this constructor may need to override the following methods: getBandType(), evaluator().
      Parameters:
      source - the source from which to copy the grid geometry.
      ranges - sample dimensions for each image band.
  • Method Details

    • IsNotRepleacable

      boolean IsNotRepleacable()
      Returns true if this coverage should not be replaced by its source.
      See Also:
    • getBandType

      DataType getBandType()
      Returns the data type identifying the primitive type used for storing sample values in each band. The default implementation returns the type of the source.
      Overrides:
      getBandType in class GridCoverage
    • evaluator

      public GridCoverage.Evaluator evaluator()
      Creates a new function for computing or interpolating sample values at given locations. That function accepts DirectPosition in arbitrary Coordinate Reference System; conversions to grid indices are applied by the source as needed.
      Overrides:
      evaluator in class GridCoverage
      Returns:
      a new function for computing or interpolating sample values.
    • toTree

      @Debug public TreeTable toTree(Locale locale, int bitmask)
      Returns a tree representation of some elements of this grid coverage. This method create the tree documented in parent class, augmented with a short summary of the source.
      Overrides:
      toTree in class GridCoverage
      Parameters:
      locale - the locale to use for textual labels.
      bitmask - combination of GridGeometry flags.
      Returns:
      a tree representation of the specified elements.
      See Also:
    • summary

      private static String summary(GridCoverage source)
      Returns a short (single-line) string representation of the given coverage. This is used for listing sources.