public class DtCoverage extends java.lang.Object implements IsMissingEvaluator
Constructor and Description |
---|
DtCoverage(DtCoverageDataset dataset,
DtCoverageCS gcs,
VariableDS dsvar)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
AttributeContainer |
attributes() |
int |
compareTo(DtCoverage g) |
boolean |
equals(java.lang.Object oo)
Instances which have same name and coordinate system are equal.
|
Attribute |
findAttributeIgnoreCase(java.lang.String name)
Convenience function; lookup Attribute by name.
|
java.lang.String |
findAttValueIgnoreCase(java.lang.String attName,
java.lang.String defaultValue)
Convenience function; lookup Attribute value by name.
|
java.util.List<Attribute> |
getAttributes()
Deprecated.
use attributes()
|
DtCoverageCS |
getCoordinateSystem()
get the GeoGridCoordSys for this GeoGrid.
|
DataType |
getDataType() |
java.lang.String |
getDescription()
get the standardized description, or null if none.
|
Dimension |
getDimension(int i)
get the ith dimension
|
java.util.List<Dimension> |
getDimensions()
Returns an ArrayList containing the dimensions used by this geoGrid.
|
Dimension |
getEnsembleDimension()
get the ensemble Dimension, if it exists
|
int |
getEnsembleDimensionIndex()
get the ensemble Dimension index in the geogrid (canonical order)
|
java.lang.String |
getFullName() |
java.lang.String |
getInfo()
nicely formatted information
|
MAMath.MinMax |
getMinMaxSkipMissingData(Array a)
Get the minimum and the maximum data value of the previously read Array,
skipping missing values as defined by isMissingData(double val).
|
java.lang.String |
getName() |
ProjectionImpl |
getProjection()
get the Projection.
|
int |
getRank()
get the rank
|
Dimension |
getRunTimeDimension()
get the run time Dimension, if it exists
|
int |
getRunTimeDimensionIndex()
get the runtime Dimension index in the geogrid (canonical order)
|
int[] |
getShape()
get the shape
|
java.lang.String |
getShortName() |
Dimension |
getTimeDimension()
get the time Dimension, if it exists
|
int |
getTimeDimensionIndex()
get the time Dimension index in the geogrid (canonical order), or -1 if none
|
java.lang.String |
getUnitsString()
get the unit as a string
|
VariableDS |
getVariable() |
Dimension |
getXDimension()
get the x Dimension, if it exists
|
int |
getXDimensionIndex()
get the x Dimension index in the geogrid (canonical order)
|
Dimension |
getYDimension()
get the y Dimension, if it exists
|
int |
getYDimensionIndex()
get the y Dimension index in the geogrid (canonical order)
|
Dimension |
getZDimension()
get the z Dimension, if it exists
|
int |
getZDimensionIndex()
get the z Dimension index in the geogrid (canonical order), or -1 if none
|
int |
hashCode()
Override Object.hashCode() to be consistent with equals.
|
boolean |
hasMissing()
true if there may be missing data
|
boolean |
hasMissingData()
true if there may be missing data, see VariableDS.hasMissing()
|
boolean |
isMissing(double val)
if val is a missing data value
|
boolean |
isMissingData(double val)
if val is missing data, see VariableDS.isMissingData()
|
Array |
readDataSection(Section subset,
boolean canonicalOrder)
This reads an arbitrary data section, returning the data in
canonical order (rt-e-t-z-y-x).
|
Array |
readDataSlice(int t,
int z,
int y,
int x)
This reads an arbitrary data slice, returning the data in
canonical order (t-z-y-x).
|
Array |
readDataSlice(int rt,
int e,
int t,
int z,
int y,
int x)
This reads an arbitrary data slice, returning the data in
canonical order (rt-e-t-z-y-x).
|
float[] |
setMissingToNaN(float[] values)
Convert (in place) all values in the given array that are considered
as "missing" to Float.NaN, according to isMissingData(val).
|
java.lang.String |
toString()
string representation
|
public DtCoverage(DtCoverageDataset dataset, DtCoverageCS gcs, VariableDS dsvar)
dataset
- belongs to this datasetdsvar
- wraps this Variablegcs
- has this grid coordinate systempublic java.util.List<Dimension> getDimensions()
public Dimension getDimension(int i)
i
- : which dimensionpublic Dimension getTimeDimension()
public Dimension getZDimension()
public Dimension getYDimension()
public Dimension getXDimension()
public Dimension getEnsembleDimension()
public Dimension getRunTimeDimension()
public int getTimeDimensionIndex()
public int getZDimensionIndex()
public int getYDimensionIndex()
public int getXDimensionIndex()
public int getEnsembleDimensionIndex()
public int getRunTimeDimensionIndex()
public Attribute findAttributeIgnoreCase(java.lang.String name)
name
- the name of the attributepublic java.lang.String findAttValueIgnoreCase(java.lang.String attName, java.lang.String defaultValue)
attName
- name of the attributedefaultValue
- if not found, use this as the defaultpublic int getRank()
public int[] getShape()
public DataType getDataType()
public AttributeContainer attributes()
@Deprecated public java.util.List<Attribute> getAttributes()
public VariableDS getVariable()
public java.lang.String getFullName()
public java.lang.String getName()
public java.lang.String getShortName()
public DtCoverageCS getCoordinateSystem()
public ProjectionImpl getProjection()
public java.lang.String getDescription()
public java.lang.String getUnitsString()
public boolean hasMissingData()
public boolean isMissingData(double val)
public boolean hasMissing()
IsMissingEvaluator
hasMissing
in interface IsMissingEvaluator
public boolean isMissing(double val)
IsMissingEvaluator
isMissing
in interface IsMissingEvaluator
val
- test this valuepublic float[] setMissingToNaN(float[] values)
values
- input arraypublic MAMath.MinMax getMinMaxSkipMissingData(Array a)
a
- Array to get min/max valuespublic Array readDataSlice(int t, int z, int y, int x) throws java.io.IOException
t
- if < 0, get all of time dim; if valid index, fix slice to that value.z
- if < 0, get all of z dim; if valid index, fix slice to that value.y
- if < 0, get all of y dim; if valid index, fix slice to that value.x
- if < 0, get all of x dim; if valid index, fix slice to that value.java.io.IOException
public Array readDataSlice(int rt, int e, int t, int z, int y, int x) throws java.io.IOException
rt
- if < 0, get all of runtime dim; if valid index, fix slice to that value.e
- if < 0, get all of ensemble dim; if valid index, fix slice to that value.t
- if < 0, get all of time dim; if valid index, fix slice to that value.z
- if < 0, get all of z dim; if valid index, fix slice to that value.y
- if < 0, get all of y dim; if valid index, fix slice to that value.x
- if < 0, get all of x dim; if valid index, fix slice to that value.java.io.IOException
public Array readDataSection(Section subset, boolean canonicalOrder) throws InvalidRangeException, java.io.IOException
subset
- - each Range must be named by the axisType that its used for. order not importantInvalidRangeException
java.io.IOException
public boolean equals(java.lang.Object oo)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getInfo()
public int compareTo(DtCoverage g)