|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectucar.nc2.Variable
ucar.nc2.dataset.VariableDS
ucar.nc2.dataset.CoordinateAxis
public class CoordinateAxis
A Coordinate Axis is a Variable that specifies one of the coordinates of a CoordinateSystem. Mathematically it is a scalar function F from index space to S:
F:D -> S where D is a product set of dimensions (aka index space), and S is the set of reals (R) or Strings.If its element type is char, it is considered a string-valued Coordinate Axis and rank is reduced by one, since the outermost dimension is considered the string length: v(i, j, .., strlen). If its element type is String, it is a string-valued Coordinate Axis. Otherwise it is numeric-valued, and isNumeric() is true. The one-dimensional case F(i) -> R is the common case which affords important optimizations. In that case, use the subtype CoordinateAxis1D. The factory methods will return either a CoordinateAxis1D if the variable is one-dimensional, a CoordinateAxis2D if its 2D, or a CoordinateAxis for the general case. A CoordinateAxis is optionally marked as georeferencing with an AxisType. It should have a units string and optionally a description string. A Structure cannot be a CoordinateAxis, although members of Structures can.
| Nested Class Summary | |
|---|---|
static class |
CoordinateAxis.AxisComparator
Standard sort on Coordinate Axes |
| Field Summary | |
|---|---|
static java.lang.String |
POSITIVE_DOWN
|
static java.lang.String |
POSITIVE_UP
|
| Fields inherited from class ucar.nc2.Variable |
|---|
defaultSizeToCache |
| Constructor Summary | |
|---|---|
CoordinateAxis(NetcdfDataset ds,
Group group,
java.lang.String shortName,
DataType dataType,
java.lang.String dims,
java.lang.String units,
java.lang.String desc)
Constructor when theres no underlying variable. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object oo)
Instances which have same content are equal. |
static CoordinateAxis |
factory(NetcdfDataset ncd,
VariableDS vds)
Create a coordinate axis from an existing Variable. |
AxisType |
getAxisType()
|
java.lang.String |
getBoundaryRef()
The name of this coordinate axis' boundary variable |
java.lang.String |
getInfo()
|
double |
getMaxValue()
|
double |
getMinValue()
|
java.lang.String |
getPositive()
Get the direction of increasing values, used only for vertical Axes. |
java.lang.String |
getUnitsString()
Get the Unit String for the Variable. |
int |
hashCode()
Override Object.hashCode() to implement equals. |
boolean |
isContiguous()
If the edges are contiguous or disjoint Caution: many datasets do not explicitly specify this info, this is often a guess; default is true. |
boolean |
isNumeric()
|
CoordinateAxis |
makeCopy()
|
void |
setAxisType(AxisType axisType)
Set type of axis, or null if none. |
void |
setBoundaryRef(java.lang.String boundaryRef)
Set a reference to a boundary variable. |
void |
setContiguous(boolean isContiguous)
Set if the edges are contiguous or disjoint. |
void |
setPositive(java.lang.String positive)
Set the direction of increasing values, used only for vertical Axes. |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.lang.Comparable |
|---|
compareTo |
| Field Detail |
|---|
public static final java.lang.String POSITIVE_UP
public static final java.lang.String POSITIVE_DOWN
| Constructor Detail |
|---|
public CoordinateAxis(NetcdfDataset ds,
Group group,
java.lang.String shortName,
DataType dataType,
java.lang.String dims,
java.lang.String units,
java.lang.String desc)
ds - the containing dataset.group - the containing group; if null, use rootGroupshortName - axis name.dataType - data typedims - list of dimension namesunits - units of coordinates, preferably udunit compatible.desc - long name.| Method Detail |
|---|
public static CoordinateAxis factory(NetcdfDataset ncd,
VariableDS vds)
ncd - the containing datasetvds - an existing Variable in dataset.
public CoordinateAxis makeCopy()
public AxisType getAxisType()
public void setAxisType(AxisType axisType)
axisType - set to this valuepublic java.lang.String getUnitsString()
Variable
getUnitsString in interface EnhancementsgetUnitsString in interface VariableIFgetUnitsString in interface VariableSimpleIFgetUnitsString in class VariableDSpublic boolean isNumeric()
public boolean isContiguous()
public void setContiguous(boolean isContiguous)
isContiguous - true if the adjacent edges touchpublic java.lang.String getPositive()
public void setPositive(java.lang.String positive)
positive - POSITIVE_UP, POSITIVE_DOWN, or null if you dont know..public java.lang.String getBoundaryRef()
public void setBoundaryRef(java.lang.String boundaryRef)
boundaryRef - the name of a boundary coordinate variable in the same dataset.public double getMinValue()
public double getMaxValue()
public java.lang.String getInfo()
public boolean equals(java.lang.Object oo)
equals in class Variablepublic int hashCode()
hashCode in class Variable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||