|
||||||||||
| 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, this it is a string-valued Coordinate Axis of rank-1, where the outermost dimension is considered the string length: v(i, j, .. strlen); 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.
| Nested Class Summary | |
|---|---|
static class |
CoordinateAxis.AxisComparator
Standard sort on Coordinate Axes |
| Nested classes/interfaces inherited from class ucar.nc2.Variable |
|---|
Variable.Cache |
| Field Summary | |
|---|---|
protected AxisType |
axisType
|
protected java.lang.String |
boundaryRef
|
protected boolean |
isContiguous
|
protected java.lang.String |
positive
|
static java.lang.String |
POSITIVE_DOWN
|
static java.lang.String |
POSITIVE_UP
|
| Fields inherited from class ucar.nc2.Variable |
|---|
attributes, cache, dataType, debugCaching, defaultSizeToCache, dimensions, elementSize, group, isCoordinateAxis, isMetadata, isSection, isSlice, isVlen, ncfile, orgVar, parent, scalarIndex, sectionRanges, shape, shortName, sizeToCache, sliceDim, sliceRanges |
| 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. |
protected |
CoordinateAxis(Variable vds)
Create a coordinate axis from an existing Variable. |
| Method Summary | |
|---|---|
protected boolean |
cacheOK()
|
int |
compareTo(java.lang.Object o)
Use the name to sort on |
boolean |
equals(java.lang.Object oo)
Instances which have same content are equal. |
static CoordinateAxis |
factory(NetcdfDataset dataset,
VariableDS vds)
Create a coordinate axis from an existing Variable. |
AxisType |
getAxisType()
Get type of axis, or null if none. |
java.lang.String |
getBoundaryRef()
Get the name of this coordinate axis' boundary variable, or null if none. |
java.lang.String |
getInfo()
formatted string representation |
double |
getMaxValue()
Get the minimum coordinate value |
double |
getMinValue()
Get the maximum coordinate value |
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. |
boolean |
isNumeric()
If the CoordAxis is numeric or string valued. |
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 |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface ucar.nc2.VariableSimpleIF |
|---|
findAttributeIgnoreCase, getAttributes, getDataType, getDimensions, getName, getRank, getShape, getShortName |
| Field Detail |
|---|
public static final java.lang.String POSITIVE_UP
public static final java.lang.String POSITIVE_DOWN
protected AxisType axisType
protected java.lang.String positive
protected java.lang.String boundaryRef
protected boolean isContiguous
| Constructor Detail |
|---|
protected CoordinateAxis(Variable vds)
vds - an existing Variable in dataset.
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 dataset,
VariableDS vds)
dataset - the containing datasetvds - an existing Variable in dataset.
public AxisType getAxisType()
public void setAxisType(AxisType axisType)
public java.lang.String getUnitsString()
Variable
getUnitsString in interface EnhancementsgetUnitsString in interface VariableSimpleIFgetUnitsString in class VariableDSpublic boolean isNumeric()
public boolean isContiguous()
public void setContiguous(boolean isContiguous)
public java.lang.String getPositive()
public void setPositive(java.lang.String positive)
public java.lang.String getBoundaryRef()
public void setBoundaryRef(java.lang.String boundaryRef)
protected boolean cacheOK()
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 Variablepublic int compareTo(java.lang.Object o)
compareTo in interface java.lang.ComparablecompareTo in class VariableDSo - the other CoordinateAxis
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||