public class CoordinateAxis extends VariableDS
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.
| Modifier and Type | Class and Description |
|---|---|
static class |
CoordinateAxis.AxisComparator
Standard sort on Coordinate Axes
|
static class |
CoordinateAxis.Builder<T extends CoordinateAxis.Builder<T>> |
defaultCoordsSizeToCache, defaultSizeToCache, permitCaching| Constructor and Description |
|---|
CoordinateAxis(NetcdfDataset ds,
Group group,
String shortName,
DataType dataType,
String dims,
String units,
String desc)
Deprecated.
Use CoordinateAxis.builder()
|
| Modifier and Type | Method and Description |
|---|---|
static CoordinateAxis.Builder<?> |
builder()
Get Builder for this class that allows subclassing.
|
CoordinateAxis |
copyNoCache()
Make a copy, with an independent cache.
|
boolean |
equals(Object oo)
Instances which have same content are equal.
|
static CoordinateAxis |
factory(NetcdfDataset ncd,
VariableDS vds)
Deprecated.
Use CoordinateAxis.fromVariableDS()
|
static CoordinateAxis.Builder |
fromVariableDS(VariableDS.Builder<?> vdsBuilder)
Create a coordinate axis from an existing Variable.Builder.
|
AxisType |
getAxisType()
Get type of axis
|
String |
getBoundaryRef()
The name of this coordinate axis' boundary variable
|
Calendar |
getCalendarFromAttribute() |
void |
getInfo(Formatter buf)
Get a string representation
|
double |
getMaxValue()
The largest coordinate value.
|
double |
getMinValue()
The smallest coordinate value.
|
String |
getPositive()
Get the direction of increasing values, used only for vertical Axes.
|
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 |
isIndependentCoordinate() |
boolean |
isInterval()
An interval coordinate consists of two numbers, bound1 and bound2.
|
boolean |
isNumeric()
Does the axis have numeric values.
|
void |
setAxisType(AxisType axisType)
Deprecated.
Use CoordinateAxis.builder()
|
void |
setBoundaryRef(String boundaryRef)
Deprecated.
Use CoordinateAxis.builder()
|
void |
setPositive(String positive)
Deprecated.
Use CoordinateAxis.builder()
|
CoordinateAxis.Builder<?> |
toBuilder()
Turn into a mutable Builder.
|
addCoordinateSystem, addEnhancement, applyScaleOffset, applyScaleOffset, clearCoordinateSystems, convert, convertMissing, convertMissing, convertUnsigned, convertUnsigned, enhance, getCoordinateSystems, getDatasetLocation, getDescription, getEnhanceMode, getFillValue, getMissingDataArray, getMissingValues, getNetcdfFile, getOffset, getOriginalDataType, getOriginalName, getOriginalVariable, getScaledOffsetType, getScaleFactor, getSignedness, getUnsignedConversionType, getValidMax, getValidMin, hasCachedDataRecurse, hasFillValue, hasMissing, hasMissingValue, hasScaleOffset, hasValidData, isFillValue, isInvalidData, isMissing, isMissingValue, lookupEnumString, readToStream, reallyRead, reallyRead, removeCoordinateSystem, removeEnhancement, setCaching, setFillValueIsMissing, setInvalidDataIsMissing, setMissingDataIsMissing, setName, setOriginalVariable, setUnitsString, showScaleMissingProxy, toStringDebugaddAll, addAttribute, attributes, compareTo, createNewCache, findAttribute, findAttributeDouble, findAttributeIgnoreCase, findAttributeInteger, findAttValueIgnoreCase, findDimensionIndex, getAttributes, getDAPName, getDAPName, getDataType, getDimension, getDimensions, getDimensionsAll, getDimensionsString, getElementSize, getEnumTypedef, getFileTypeId, getNameAndDimensions, getNameAndDimensions, getNameAndDimensions, getNameAndDimensions, getNameAndDimensions, getNameAndDimensions, getParentGroup, getProxyReader, getRanges, getRank, getShape, getShape, getShapeAll, getShapeAsSection, getSize, getSizeToCache, getSPobject, hasCachedData, invalidateCache, isCaching, isCoordinateVariable, isImmutable, isMetadata, isScalar, isUnknownLength, isUnlimited, isVariableLength, read, read, read, read, read, readScalarByte, readScalarDouble, readScalarFloat, readScalarInt, readScalarLong, readScalarShort, readScalarString, readToByteChannel, reduce, remove, removeAttribute, removeAttributeIgnoreCase, resetDimensions, resetShape, section, section, setCachedData, setCachedData, setDataType, setDimension, setDimensions, setDimensions, setDimensionsAnonymous, setElementSize, setEnumTypedef, setImmutable, setIsScalar, setParentGroup, setProxyReader, setSizeToCache, setSPobject, setValues, setValues, slice, toString, writeCDLannotate, annotation, getDODSName, getFullName, getFullNameEscaped, getGroup, getImmutable, getName, getParentStructure, getShortName, getSort, isMemberOfStructure, localhash, setDODSName, setParentStructure, setShortName, setSort, unwrapgetFullName, getShortNamegetFullName, getName, getShortNamegetName, hasAttribute, iteratorforEach, spliterator@Deprecated public CoordinateAxis(NetcdfDataset ds, Group group, String shortName, DataType dataType, String dims, String units, 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.@Deprecated public static CoordinateAxis factory(NetcdfDataset ncd, VariableDS vds)
ncd - the containing datasetvds - an existing Variable in dataset.public static CoordinateAxis.Builder fromVariableDS(VariableDS.Builder<?> vdsBuilder)
vdsBuilder - an existing Variable in dataset.public CoordinateAxis copyNoCache()
public AxisType getAxisType()
@Deprecated public void setAxisType(AxisType axisType)
axisType - set to this valuepublic String getUnitsString()
VariablegetUnitsString in interface EnhancementsgetUnitsString in interface VariableSimpleIFgetUnitsString in class VariableDSpublic boolean isNumeric()
public boolean isContiguous()
public boolean isInterval()
public boolean isIndependentCoordinate()
public String getPositive()
@Deprecated public void setPositive(String positive)
positive - POSITIVE_UP, POSITIVE_DOWN, or null if you dont know..public String getBoundaryRef()
@Deprecated public void setBoundaryRef(String boundaryRef)
boundaryRef - the name of a boundary coordinate variable in the same dataset.public double getMinValue()
public double getMaxValue()
public void getInfo(Formatter buf)
buf - place info herepublic boolean equals(Object oo)
public int hashCode()
public Calendar getCalendarFromAttribute()
public CoordinateAxis.Builder<?> toBuilder()
VariabletoBuilder in class VariableDSpublic static CoordinateAxis.Builder<?> builder()