public abstract class CDMUtil
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static ucar.ma2.Index |
SCALAR |
| Constructor and Description |
|---|
CDMUtil() |
| Modifier and Type | Method and Description |
|---|---|
static ucar.ma2.Index |
cdmIndexToIndex(ucar.ma2.Index cdmidx) |
static int[] |
computeEffectiveShape(java.util.List<DapDimension> dimset)
Compute the shape inferred from a set of slices.
|
static boolean |
containsVLEN(java.util.List<ucar.nc2.Dimension> dimset)
Test if any dimension is variable length
|
static java.lang.Object |
convertVector(DapType dsttype,
DapType srctype,
java.lang.Object src)
Convert an array of one type of values to another type
|
static java.util.List<ucar.ma2.Range> |
createCDMRanges(java.util.List<Slice> slices) |
static java.util.List<Slice> |
createSlices(java.util.List<ucar.ma2.Range> rangelist)
Convert a list of ucar.ma2.Range to a list of Slice
More or less the inverst of create CDMRanges
|
static java.util.List<ucar.ma2.Range> |
dimsetToRanges(java.util.List<DapDimension> dimset) |
static java.lang.String |
getChecksumString(byte[] checksum) |
static boolean |
hasVLEN(java.util.List<ucar.ma2.Range> ranges) |
static boolean |
hasVLEN(ucar.nc2.Variable v)
Test if any dimension is variable length
|
static ucar.ma2.Index |
indexToCcMIndex(ucar.ma2.Index d4) |
static java.util.List<Slice> |
indexToSlices(ucar.ma2.Index indices)
Convert DataIndex to list of slices
|
static boolean |
isWhole(java.util.List<ucar.ma2.Range> rangelist,
java.util.List<DapDimension> dimset,
int start,
int stop)
Test a List
|
static boolean |
isWhole(java.util.List<ucar.ma2.Range> rangelist,
java.util.List<Slice> slices)
Test a List
|
static boolean |
isWhole(java.util.List<ucar.ma2.Range> rangelist,
ucar.nc2.Variable var)
Test a List
|
static java.util.List<Slice> |
shapeToSlices(int[] shape) |
static ucar.ma2.Index |
slicesToIndex(java.util.List<Slice> slices)
If a set of slices refers to a single position,
then return the corresponding Index.
|
static ucar.nc2.Variable |
unwrap(ucar.nc2.Variable var)
NetcdfDataset can end up wrapping a variable
in multiple wrapping classes (e.g.
|
static ucar.nc2.NetcdfFile |
unwrapfile(ucar.nc2.NetcdfFile file)
NetcdfDataset can wrap a NetcdfFile.
|
public static java.util.List<Slice> createSlices(java.util.List<ucar.ma2.Range> rangelist) throws DapException
rangelist - the set of ucar.ma2.RangeDapExceptionpublic static boolean isWhole(java.util.List<ucar.ma2.Range> rangelist,
java.util.List<DapDimension> dimset,
int start,
int stop)
throws DapException
rangelist - the set of ucar.ma2.Rangedimset - the set of DapDimensionsstart - start looking herestop - stop looking hereDapExceptionpublic static boolean isWhole(java.util.List<ucar.ma2.Range> rangelist,
java.util.List<Slice> slices)
throws DapException
rangelist - the set of ucar.ma2.Rangeslices - the set of slicesDapExceptionpublic static boolean isWhole(java.util.List<ucar.ma2.Range> rangelist,
ucar.nc2.Variable var)
throws DapException
rangelist - the set of ucar.ma2.Rangevar - the cdm varDapExceptionpublic static java.util.List<ucar.ma2.Range> createCDMRanges(java.util.List<Slice> slices) throws DapException
DapExceptionpublic static ucar.nc2.Variable unwrap(ucar.nc2.Variable var)
var - possibly wrapped variablepublic static ucar.nc2.NetcdfFile unwrapfile(ucar.nc2.NetcdfFile file)
file - NetcdfFile or NetcdfDatasetpublic static boolean hasVLEN(java.util.List<ucar.ma2.Range> ranges)
public static boolean hasVLEN(ucar.nc2.Variable v)
public static boolean containsVLEN(java.util.List<ucar.nc2.Dimension> dimset)
public static int[] computeEffectiveShape(java.util.List<DapDimension> dimset)
dimset - from which to generate shapepublic static java.lang.Object convertVector(DapType dsttype, DapType srctype, java.lang.Object src)
dsttype - target typesrctype - source typesrc - array of values to convertpublic static java.lang.String getChecksumString(byte[] checksum)
public static java.util.List<ucar.ma2.Range> dimsetToRanges(java.util.List<DapDimension> dimset) throws DapException
DapExceptionpublic static java.util.List<Slice> shapeToSlices(int[] shape) throws DapException
DapExceptionpublic static ucar.ma2.Index cdmIndexToIndex(ucar.ma2.Index cdmidx)
public static ucar.ma2.Index indexToCcMIndex(ucar.ma2.Index d4)
public static java.util.List<Slice> indexToSlices(ucar.ma2.Index indices) throws DapException
indices - to convertDapExceptionpublic static ucar.ma2.Index slicesToIndex(java.util.List<Slice> slices) throws DapException
slices - DapException