Class ConvertedGridCoverage.SampleConverter

java.lang.Object
org.apache.sis.coverage.grid.EvaluatorWrapper
org.apache.sis.coverage.grid.ConvertedGridCoverage.SampleConverter
All Implemented Interfaces:
Function<org.opengis.geometry.DirectPosition,double[]>, BandedCoverage.Evaluator, GridCoverage.Evaluator
Enclosing class:
ConvertedGridCoverage

private final class ConvertedGridCoverage.SampleConverter extends EvaluatorWrapper
Implementation of evaluator returned by ConvertedGridCoverage.evaluator(). This evaluator delegates all operations to the DerivedGridCoverage.source coverage and converts the returned sample values.
  • Constructor Details

    • SampleConverter

      SampleConverter()
      Creates a new evaluator for the enclosing coverage.
  • Method Details

    • getCoverage

      public GridCoverage getCoverage()
      Returns the enclosing coverage.
      Returns:
      the source of sample values for this evaluator.
    • apply

      public double[] apply(org.opengis.geometry.DirectPosition point) throws CannotEvaluateException
      Returns a sequence of double values for a given point in the coverage. This method delegates to the source coverage, then converts the values.
      Specified by:
      apply in interface BandedCoverage.Evaluator
      Specified by:
      apply in interface Function<org.opengis.geometry.DirectPosition,double[]>
      Overrides:
      apply in class EvaluatorWrapper
      Parameters:
      point - the position where to evaluate.
      Returns:
      the sample values at the specified point, or null if the point is outside the coverage. For performance reason, this method may return the same array on every method call by overwriting previous values. Callers should not assume that the array content stay valid for a long time.
      Throws:
      CannotEvaluateException - if the values cannot be computed.