Enum Class GridCoverageProcessor.Optimization

All Implemented Interfaces:
Serializable, Comparable<Grid­Coverage­Processor​.Optimization>, Constable
Enclosing class:
Grid­Coverage­Processor

public static enum GridCoverageProcessor.Optimization extends Enum<GridCoverageProcessor.Optimization>
Types of changes that a coverage processor can do for executing an operation more efficiently. For example, the processor may, in some cases, replace an operation by a more efficient one. Those optimizations should not change significantly the sample values at any given location, but may change other aspects (in a compatible way) such as the Grid­Coverage subclass returned or the size of the underlying rendered images.

By default the REPLACE_OPERATION and REPLACE_SOURCE optimizations are enabled. Users may want to disable some optimizations for example in order to get more predictable results.

Since:
1.3
See Also:
  • Enum Constant Details

    • REPLACE_OPERATION

      public static final GridCoverageProcessor.Optimization REPLACE_OPERATION
      Allows the replacement of an operation by a more efficient one. This optimization is enabled by default.

      Example

      If the resample(…) method is invoked with parameter values that cause the resampling to be a translation of the grid by an integer amount of cells, then by default Grid­Coverage­Processor will use the shift­Grid(…) algorithm instead. This option can be cleared for forcing a full resampling operation in all cases.
    • REPLACE_SOURCE

      public static final GridCoverageProcessor.Optimization REPLACE_SOURCE
      Allows the replacement of source parameter by a more fundamental source. This replacement may change the results, but usually with better accuracy. This optimization is enabled by default.

      Example

      If the resample(…) method is invoked with a source grid coverage which is itself the result of a previous resampling, then instead of resampling an already resampled coverage, by default Grid­Coverage­Processor will resample the original coverage. This option can be cleared for disabling that replacement.
  • Method Details

    • values

      public static GridCoverageProcessor.Optimization[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static GridCoverageProcessor.Optimization valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      Illegal­Argument­Exception - if this enum class has no constant with the specified name
      Null­Pointer­Exception - if the argument is null