Package org.apache.sis.coverage.grid
Class GridCoverage2D.PixelAccessor
java.lang.Object
org.apache.sis.coverage.grid.DefaultEvaluator
org.apache.sis.coverage.grid.GridCoverage2D.PixelAccessor
- All Implemented Interfaces:
Function<org.opengis.geometry.DirectPosition,
,double[]> BandedCoverage.Evaluator
,GridCoverage.Evaluator
- Enclosing class:
GridCoverage2D
Implementation of evaluator returned by
BandedCoverage.evaluator()
.-
Field Summary
Fields inherited from class org.apache.sis.coverage.grid.DefaultEvaluator
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.Methods inherited from class org.apache.sis.coverage.grid.DefaultEvaluator
evaluate, getCoverage, getDefaultSlice, isNullIfOutside, isWraparoundEnabled, setDefaultSlice, setNullIfOutside, setWraparoundEnabled, toGridCoordinates, toGridPosition
-
Constructor Details
-
PixelAccessor
PixelAccessor()Creates a new evaluator for the enclosing coverage.
-
-
Method Details
-
apply
Returns a sequence of double values for a given point in the coverage. The CRS of the given point may be any coordinate reference system, ornull
for the same CRS than the coverage.- Specified by:
apply
in interfaceBandedCoverage.Evaluator
- Specified by:
apply
in interfaceFunction<org.opengis.geometry.DirectPosition,
double[]> - Overrides:
apply
in classDefaultEvaluator
- 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 at the specified coordinates for another reason. This exception may be thrown if the coverage data type cannot be converted todouble
by an identity or widening conversion. Subclasses may relax this constraint if appropriate.
-