public class TileCachedGrid extends Grid
TileCachedGrid
class is a Grid
whose data
is supplied from a TileSource
and cached via the
TileCacheManager
.data, dims, isUnsigned, lookup, unsignedType
Constructor and Description |
---|
TileCachedGrid(Grid grid,
TileSource source)
Constructs a new grid from the specified tile source.
|
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Disposes of any resources used by this variable prior to being
finalized.
|
java.lang.Object |
getData()
Gets the variable data array.
|
java.lang.Object |
getData(int[] start,
int[] count)
Gets a subset of grid data values.
|
java.lang.Class |
getDataClass()
Gets the class associated with components of the data array.
|
TilingScheme |
getTilingScheme()
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 |
main(java.lang.String[] argv)
Tests this class.
|
void |
setValue(int index,
double val)
Writes a scaled data value.
|
arraycopy, checkSubset, getNavigation, getSubset, getValue, interpolate, navigate, setData, setNavigation, setValue, setValue
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
clone, getMetadataMap
public TileCachedGrid(Grid grid, TileSource source)
source
- the tile source to use for tiles.public TilingScheme getTilingScheme()
Grid
getTilingScheme
in class Grid
public java.lang.Class getDataClass()
DataVariable
getDataClass
in class DataVariable
public void dispose()
DataVariable
dispose
in class DataVariable
public void setValue(int index, double val)
DataVariable
setValue
in class DataVariable
index
- the index into the data array.val
- the data value as a double. If the data value is
Double.NaN
and the missing value is non-null, the
missing value is written to the array.DataVariable.setValue(DataLocation,double)
public double getValue(int index)
DataVariable
getValue
in class DataVariable
index
- the index into the data array.double
. The
Double.NaN
value is used if the data value is
missing.DataVariable.getValue(DataLocation)
public double getValue(int row, int col)
Grid
getValue
in class Grid
row
- the data location row.col
- the data location column.double
. The
Double.NaN
value is used if the data value is
missing or data coordinate is not valid.Grid.getValue(DataLocation)
public java.lang.Object getData()
DataVariable
getData
in class DataVariable
public java.lang.Object getData(int[] start, int[] count)
Grid
Grid.getData(int[], int[])
, but retrieves only a subset of data
values in the raw, unscaled form.getData
in class Grid
start
- the subset starting [row, column].count
- the subset dimension [rows, columns].DataVariable.getData()
public static void main(java.lang.String[] argv) throws java.lang.Exception
argv
- the array of command line parameters.java.lang.Exception