Package org.apache.sis.coverage.grid
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
Implementation of evaluator returned by
ConvertedGridCoverage.evaluator()
.
This evaluator delegates all operations to the DerivedGridCoverage.source
coverage and converts
the returned sample values.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble[]
apply
(org.opengis.geometry.DirectPosition point) Returns a sequence of double values for a given point in the coverage.Returns the enclosing coverage.Methods inherited from class org.apache.sis.coverage.grid.EvaluatorWrapper
getDefaultSlice, isNullIfOutside, isWraparoundEnabled, setDefaultSlice, setNullIfOutside, setWraparoundEnabled, toGridCoordinates
-
Constructor Details
-
SampleConverter
SampleConverter()Creates a new evaluator for the enclosing coverage.
-
-
Method Details
-
getCoverage
Returns the enclosing coverage.- Returns:
- the source of sample values for this evaluator.
-
apply
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 interfaceBandedCoverage.Evaluator
- Specified by:
apply
in interfaceFunction<org.opengis.geometry.DirectPosition,
double[]> - Overrides:
apply
in classEvaluatorWrapper
- 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.
-