Package noaa.coastwatch.util.chunk
Class GridChunkProducer
java.lang.Object
noaa.coastwatch.util.chunk.GridChunkProducer
- All Implemented Interfaces:
ChunkProducer
The
GridChunkProducer
class provides data chunks from
a Grid
object. The chunks produced will
be of an appropriate type for the grid primitive data, created using a
DataChunkFactory
instance.- Since:
- 3.4.0
- Author:
- Peter Hollemans
-
Field Summary
Modifier and TypeFieldDescriptionprotected Grid
The grid to use as a source of data.protected PackingScheme
The packing scheme for new chunks.protected ScalingScheme
The scaling scheme for new chunks.protected ChunkingScheme
The chunking scheme used or null for none. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetChunk
(ChunkPosition pos) Produces a data chunk.Gets the external type of chunks produced by this producer.getGrid()
Gets the grid used to produce data chunks for this producer.Gets the native chunking scheme for chunks obtained from this producer.Gets a prototype chunk for this producer.
-
Field Details
-
grid
The grid to use as a source of data. -
packing
The packing scheme for new chunks. -
scaling
The scaling scheme for new chunks. -
scheme
The chunking scheme used or null for none.
-
-
Constructor Details
-
GridChunkProducer
Creates a new producer.- Parameters:
grid
- the grid to use for chunk data.
-
-
Method Details
-
getGrid
Gets the grid used to produce data chunks for this producer.- Returns:
- the grid for this producer.
-
getExternalType
Description copied from interface:ChunkProducer
Gets the external type of chunks produced by this producer.- Specified by:
getExternalType
in interfaceChunkProducer
- Returns:
- the external data type.
- See Also:
-
getChunk
Description copied from interface:ChunkProducer
Produces a data chunk.- Specified by:
getChunk
in interfaceChunkProducer
- Parameters:
pos
- the position of the data chunk to produce.- Returns:
- the data chunk.
-
getNativeScheme
Description copied from interface:ChunkProducer
Gets the native chunking scheme for chunks obtained from this producer. Calls toChunkProducer.getChunk(noaa.coastwatch.util.chunk.ChunkPosition)
are optimized to use chunk positions obtained from the native scheme.- Specified by:
getNativeScheme
in interfaceChunkProducer
- Returns:
- the native chunking scheme used by this producer, or null if no native chunking scheme is used.
-
getPrototypeChunk
Description copied from interface:ChunkProducer
Gets a prototype chunk for this producer. Chunks received from theChunkProducer.getChunk(noaa.coastwatch.util.chunk.ChunkPosition)
method conform to the prototype.- Specified by:
getPrototypeChunk
in interfaceChunkProducer
- Returns:
- a prototype chunk for chunks produced by this producer.
-