public abstract class CDMUtil
extends java.lang.Object
| Constructor and Description |
|---|
CDMUtil() |
| Modifier and Type | Method and Description |
|---|---|
static Index |
cdmIndexToIndex(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<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<Range> |
createCDMRanges(java.util.List<Slice> slices) |
static java.util.List<Slice> |
createSlices(java.util.List<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<Range> |
dimsetToRanges(java.util.List<DapDimension> dimset) |
static java.lang.String |
getChecksumString(byte[] checksum) |
static boolean |
hasVLEN(java.util.List<Range> ranges) |
static boolean |
hasVLEN(Variable v)
Test if any dimension is variable length
|
static Index |
indexToCcMIndex(Index d4) |
static java.util.List<Slice> |
indexToSlices(Index indices)
Convert DataIndex to list of slices
|
static boolean |
isWhole(java.util.List<Range> rangelist,
java.util.List<DapDimension> dimset,
int start,
int stop)
Test a List
|
static boolean |
isWhole(java.util.List<Range> rangelist,
java.util.List<Slice> slices)
Test a List
|
static boolean |
isWhole(java.util.List<Range> rangelist,
Variable var)
Test a List
|
static java.util.List<Slice> |
shapeToSlices(int[] shape) |
static Index |
slicesToIndex(java.util.List<Slice> slices)
If a set of slices refers to a single position,
then return the corresponding Index.
|
static Variable |
unwrap(Variable var)
NetcdfDataset can end up wrapping a variable
in multiple wrapping classes (e.g.
|
static NetcdfFile |
unwrapfile(NetcdfFile file)
NetcdfDataset can wrap a NetcdfFile.
|
public static final Index SCALAR
public static java.util.List<Slice> createSlices(java.util.List<Range> rangelist) throws DapException
rangelist - the set of ucar.ma2.RangeDapExceptionpublic static boolean isWhole(java.util.List<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<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<Range> rangelist, Variable var) throws DapException
rangelist - the set of ucar.ma2.Rangevar - the cdm varDapExceptionpublic static java.util.List<Range> createCDMRanges(java.util.List<Slice> slices) throws DapException
DapExceptionpublic static Variable unwrap(Variable var)
var - possibly wrapped variablepublic static NetcdfFile unwrapfile(NetcdfFile file)
file - NetcdfFile or NetcdfDatasetpublic static boolean hasVLEN(java.util.List<Range> ranges)
public static boolean hasVLEN(Variable v)
public static boolean containsVLEN(java.util.List<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<Range> dimsetToRanges(java.util.List<DapDimension> dimset) throws DapException
DapExceptionpublic static java.util.List<Slice> shapeToSlices(int[] shape) throws DapException
DapExceptionpublic static java.util.List<Slice> indexToSlices(Index indices) throws DapException
indices - to convertDapExceptionpublic static Index slicesToIndex(java.util.List<Slice> slices) throws DapException
slices - DapException