Package org.apache.sis.coverage.grid
Class DerivedGridCoverage
java.lang.Object
org.apache.sis.coverage.BandedCoverage
org.apache.sis.coverage.grid.GridCoverage
org.apache.sis.coverage.grid.DerivedGridCoverage
- Direct Known Subclasses:
ConvertedGridCoverage
,ResampledGridCoverage
,TranslatedGridCoverage
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
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.sis.coverage.grid.GridCoverage
GridCoverage.Evaluator, GridCoverage.Lazy
-
Field Summary
FieldsFields inherited from class org.apache.sis.coverage.grid.GridCoverage
gridGeometry
-
Constructor Summary
ConstructorsConstructorDescriptionDerivedGridCoverage
(GridCoverage source, List<? extends SampleDimension> ranges) Constructs a new grid coverage which is derived from the given source.DerivedGridCoverage
(GridCoverage source, GridGeometry domain) Constructs a new grid coverage which is derived from the given source. -
Method Summary
Modifier and TypeMethodDescriptionCreates a new function for computing or interpolating sample values at given locations.(package private) DataType
Returns the data type identifying the primitive type used for storing sample values in each band.(package private) boolean
Returnstrue
if this coverage should not be replaced by its source.private static String
summary
(GridCoverage source) Returns a short (single-line) string representation of the given coverage.Returns a tree representation of some elements of this grid coverage.Methods inherited from class org.apache.sis.coverage.grid.GridCoverage
appendDataLayout, convert, createConvertedValues, forConvertedValues, getCoordinateReferenceSystem, getEnvelope, getGridGeometry, getSampleDimensions, render, toString
-
Field Details
-
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()Returnstrue
if this coverage should not be replaced by its source. -
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 classGridCoverage
-
evaluator
Creates a new function for computing or interpolating sample values at given locations. That function acceptsDirectPosition
in arbitrary Coordinate Reference System; conversions to grid indices are applied by the source as needed.- Overrides:
evaluator
in classGridCoverage
- Returns:
- a new function for computing or interpolating sample values.
-
toTree
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 classGridCoverage
- Parameters:
locale
- the locale to use for textual labels.bitmask
- combination ofGridGeometry
flags.- Returns:
- a tree representation of the specified elements.
- See Also:
-
summary
Returns a short (single-line) string representation of the given coverage. This is used for listing sources.
-