Package noaa.coastwatch.io
Class NOAA1bCachedGrid
java.lang.Object
noaa.coastwatch.util.MetadataContainer
noaa.coastwatch.util.DataVariable
noaa.coastwatch.util.Grid
noaa.coastwatch.io.CachedGrid
noaa.coastwatch.io.NOAA1bCachedGrid
- All Implemented Interfaces:
Cloneable
,ValueSource
The NOAA1b cached grid class is a cached grid that understands how
to read variable data from NOAA1b files.
- Since:
- 3.1.3
- Author:
- Peter Hollemans
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Default cache size in bytes.Fields inherited from class noaa.coastwatch.io.CachedGrid
accessMode, DEFAULT_MAX_TILES, DEFAULT_TILE_DIMS, READ_ONLY, READ_WRITE, tiling
Fields inherited from class noaa.coastwatch.util.DataVariable
data, dims, isUnsigned, lookup, unsignedType
-
Constructor Summary
ConstructorDescriptionNOAA1bCachedGrid
(Grid grid, NOAA1bReader reader) Constructs a new read-only NOAA1b cached grid with the specified properties. -
Method Summary
Modifier and TypeMethodDescriptionGets the class associated with components of the data array.Gets the cache data stream as an object.protected TilingScheme.Tile
Reads the specified tile.protected void
writeTile
(TilingScheme.Tile tile) Writes the specified tile.Methods inherited from class noaa.coastwatch.io.CachedGrid
clearCache, flush, getCoveringPositions, getData, getData, getMaxTiles, getTileDims, getTileSize, getTilingScheme, getValue, getValue, main, resetCache, setCacheSize, setData, setData, setMaxTiles, setOptimizedCacheSize, setTileDims, setTileSize, setValue, setValue
Methods inherited from class noaa.coastwatch.util.Grid
arraycopy, checkSubset, getNavigation, getSubset, getValue, interpolate, navigate, setNavigation, setValue
Methods inherited from class noaa.coastwatch.util.DataVariable
convertUnits, dispose, format, format, format, getClassBits, getDecimals, getDimensions, getFormat, getLongName, getMissing, getName, getOptimalStride, getRank, getScaling, getStatistics, getStatistics, getStatistics, getStatistics, getUnits, getUnsigned, getValue, getValues, setAccessHint, setFormat, setLongName, setLookup, setMissing, setName, setUnits, setUnsigned, setValue, toString
Methods inherited from class noaa.coastwatch.util.MetadataContainer
clone, getMetadataMap
-
Field Details
-
DEFAULT_CACHE_SIZE
public static final int DEFAULT_CACHE_SIZEDefault cache size in bytes.- See Also:
-
-
Constructor Details
-
NOAA1bCachedGrid
Constructs a new read-only NOAA1b cached grid with the specified properties.- Parameters:
grid
- the grid to use for attributes.reader
- the HDF reader data source.- Throws:
IOException
- if a problem occurred accessing the NOAA1b file.
-
-
Method Details
-
getDataClass
Description copied from class:DataVariable
Gets the class associated with components of the data array.- Overrides:
getDataClass
in classDataVariable
- Returns:
- the data class or null if the data array is null.
-
getDataStream
Description copied from class:CachedGrid
Gets the cache data stream as an object. This is useful for classes that read and write cached grids.- Specified by:
getDataStream
in classCachedGrid
- Returns:
- the data stream used for reading and writing data.
-
readTile
Description copied from class:CachedGrid
Reads the specified tile.- Specified by:
readTile
in classCachedGrid
- Parameters:
pos
- the tile position to read.- Returns:
- the tile at the specified position.
- Throws:
IOException
- if an error occurred reading the tile data.
-
writeTile
Description copied from class:CachedGrid
Writes the specified tile. The implementation of this method must set the tile to be not dirty upon successfully writing it, or throw an error.- Specified by:
writeTile
in classCachedGrid
- Parameters:
tile
- the tile to write.- Throws:
IOException
- if an error occurred writing the tile data.
-