Package noaa.coastwatch.io.tile
Class TileCachedGrid
java.lang.Object
noaa.coastwatch.util.MetadataContainer
noaa.coastwatch.util.DataVariable
noaa.coastwatch.util.Grid
noaa.coastwatch.io.tile.TileCachedGrid
- All Implemented Interfaces:
Cloneable
,ValueSource
The
TileCachedGrid
class is a Grid
whose data
is supplied from a TileSource
and cached via the
TileCacheManager
.- Since:
- 3.3.1
- Author:
- Peter Hollemans
-
Field Summary
Fields inherited from class noaa.coastwatch.util.DataVariable
data, dims, isUnsigned, lookup, unsignedType
-
Constructor Summary
ConstructorDescriptionTileCachedGrid
(Grid grid, TileSource source) Constructs a new grid from the specified tile source. -
Method Summary
Modifier and TypeMethodDescriptionvoid
dispose()
Disposes of any resources used by this variable prior to being finalized.getData()
Gets the variable data array.getData
(int[] start, int[] count) Gets a subset of grid data values.Gets the class associated with components of the data array.Get the tile source used by this grid.Gets the tiling scheme for this grid if one is available.double
getValue
(int index) Reads a scaled data value.double
getValue
(int row, int col) Reads a scaled data value with no navigation.static void
Tests this class.void
setValue
(int index, double val) Writes a scaled data value.Methods inherited from class noaa.coastwatch.util.Grid
arraycopy, checkSubset, getNavigation, getSubset, getValue, interpolate, navigate, setData, setNavigation, setValue, setValue
Methods inherited from class noaa.coastwatch.util.DataVariable
convertUnits, format, format, format, getClassBits, getDecimals, getDimensions, getFormat, getLongName, getMissing, getName, getOptimalStride, getRank, getScaling, getStatistics, getStatistics, getStatistics, getStatistics, getUnits, getUnsigned, getValue, getValues, setAccessHint, setData, setFormat, setLongName, setLookup, setMissing, setName, setUnits, setUnsigned, setValue, toString
Methods inherited from class noaa.coastwatch.util.MetadataContainer
clone, getMetadataMap
-
Constructor Details
-
TileCachedGrid
Constructs a new grid from the specified tile source.- Parameters:
source
- the tile source to use for tiles.
-
-
Method Details
-
getSource
Get the tile source used by this grid.- Returns:
- the tile source.
- Since:
- 3.5.0
-
getTilingScheme
Description copied from class:Grid
Gets the tiling scheme for this grid if one is available.- Overrides:
getTilingScheme
in classGrid
- Returns:
- the tiling scheme or null for none.
-
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.
-
dispose
public void dispose()Description copied from class:DataVariable
Disposes of any resources used by this variable prior to being finalized. This method does nothing at this level, but may be overridden in the subclass to release resources.- Overrides:
dispose
in classDataVariable
-
setValue
public void setValue(int index, double val) Description copied from class:DataVariable
Writes a scaled data value. The data value is scaled according to the scaling factor and offset and written to the data array.- Overrides:
setValue
in classDataVariable
- Parameters:
index
- the index into the data array.val
- the data value as a double. If the data value isDouble.NaN
and the missing value is non-null, the missing value is written to the array.- See Also:
-
getValue
public double getValue(int index) Description copied from class:DataVariable
Reads a scaled data value. The data value is read from the data array and scaled according to the scaling factor and offset.- Overrides:
getValue
in classDataVariable
- Parameters:
index
- the index into the data array.- Returns:
- the scaled data value as a
double
. TheDouble.NaN
value is used if the data value is missing. - See Also:
-
getValue
public double getValue(int row, int col) Description copied from class:Grid
Reads a scaled data value with no navigation. The data value is read from the data array and scaled according to the scaling factor and offset. No navigation transform is applied to correct the data location. -
getData
Description copied from class:DataVariable
Gets the variable data array. The returned data is read-only -- the result of attempting to set values in the data is undefined.- Overrides:
getData
in classDataVariable
-
getData
Description copied from class:Grid
Gets a subset of grid data values. This method is similar toGrid.getData(int[], int[])
, but retrieves only a subset of data values in the raw, unscaled form. -
main
Tests this class.- Parameters:
argv
- the array of command line parameters.- Throws:
Exception
-