@Deprecated public class CoordinateAxis1D extends CoordinateAxis
If this is char valued, it will have rank 2, otherwise it will have rank 1.
If string or char valued, only getCoordName() can be called.
If the coordinates are regularly spaced, isRegular() is true, and the values are equal to getStart() + i * getIncrement().
This will also set "cell bounds" for this axis. By default, the cell bounds are midway between the coordinates values, and are therefore contiguous, and can be accessed though getCoordEdge(i). The only way the bounds can be set is if the coordinate variable has an attribute "bounds" that points to another variable bounds(ncoords,2). These contain the cell bounds, and must be ascending or descending as the coordinate values are. In this case isContiguous() is true when bounds1(i+1) == bounds2(i) for all i.
| Modifier and Type | Class and Description |
|---|---|
static class |
CoordinateAxis1D.Builder<T extends CoordinateAxis1D.Builder<T>>
Deprecated.
|
CoordinateAxis.AxisComparatorVariable.Cache| Modifier and Type | Field and Description |
|---|---|
protected double[] |
coords
Deprecated.
|
protected boolean |
wasRead
Deprecated.
|
axisType, boundaryRef, isContiguous, ncd, positiveorgDataType, orgName, orgVarattributes, cache, dataType, dimensions, elementSize, hashCode, isVariableLength, ncfile, permitCaching, proxyReader, shape, spiObject| Modifier | Constructor and Description |
|---|---|
protected |
CoordinateAxis1D(CoordinateAxis1D.Builder<?> builder,
Group parentGroup)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
protected CoordinateAxis1D.Builder<?> |
addLocalFieldsToBuilder(CoordinateAxis1D.Builder<? extends CoordinateAxis1D.Builder<?>> b)
Deprecated.
|
static CoordinateAxis1D.Builder<?> |
builder()
Deprecated.
Get Builder for this class that allows subclassing.
|
CoordinateAxis1D |
correctLongitudeWrap()
Deprecated.
If longitude coordinate is not monotic, construct a new one that is.
|
int |
findCoordElement(double coordVal)
Deprecated.
Given a coordinate value, find what grid element contains it.
|
int |
findCoordElementBounded(double coordVal)
Deprecated.
Given a coordinate position, find what grid element contains it, or is closest to it.
|
double[] |
getBound1()
Deprecated.
Get the coordinate bound1 as a double array.
|
double[] |
getBound2()
Deprecated.
Get the coordinate bound1 as a double array.
|
double[] |
getCoordBounds(int i)
Deprecated.
Get the coordinate bounds for the ith coordinate.
|
double |
getCoordBoundsMidpoint(int i)
Deprecated.
|
double |
getCoordEdge(int index)
Deprecated.
Get the ith coordinate edge.
|
double[] |
getCoordEdges()
Deprecated.
Get the coordinate edges as a double array.
|
String |
getCoordName(int index)
Deprecated.
The "name" of the ith coordinate.
|
double |
getCoordValue(int index)
Deprecated.
Get the ith coordinate value.
|
double[] |
getCoordValues()
Deprecated.
Get the coordinate values as a double array.
|
double |
getIncrement()
Deprecated.
Get increment value if isRegular()
|
double |
getMaxEdgeValue()
Deprecated.
|
double |
getMaxValue()
Deprecated.
The largest coordinate value.
|
double |
getMinEdgeValue()
Deprecated.
|
double |
getMinValue()
Deprecated.
The smallest coordinate value.
|
double |
getStart()
Deprecated.
Get starting value if isRegular()
|
boolean |
isContiguous()
Deprecated.
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 |
isInterval()
Deprecated.
If this coordinate has interval values.
|
boolean |
isRegular()
Deprecated.
If true, then value(i) = getStart() + i * getIncrement().
|
protected void |
readValues()
Deprecated.
|
CoordinateAxis1D |
section(Range r)
Deprecated.
Create a new CoordinateAxis1D as a section of this CoordinateAxis1D.
|
CoordinateAxis1D.Builder<?> |
toBuilder()
Deprecated.
Turn into a mutable Builder.
|
addLocalFieldsToBuilder, equals, fromVariableDS, getAxisType, getBoundaryRef, getCalendarFromAttribute, getCalendarFromAttribute, getInfo, getPositive, getUnitsString, hashCode, isIndependentCoordinate, isNumeric_read, _read, addLocalFieldsToBuilder, applyScaleOffset, applyScaleOffset, convert, convertArray, convertMissing, convertMissing, convertNeeded, convertUnsigned, convertUnsigned, fromVar, getCoordinateSystems, getDatasetLocation, getDescription, getEnhanceMode, getFillValue, getMissingDataArray, getMissingValues, getNetcdfFile, getOffset, getOriginalArrayType, getOriginalDataType, getOriginalName, getOriginalVariable, getScaledOffsetType, getScaleFactor, getSignedness, getUnsignedConversionType, getValidMax, getValidMin, hasFillValue, hasMissing, hasMissingValue, hasScaleOffset, hasValidData, isFillValue, isInvalidData, isMissing, isMissingValue, lookupEnumString, proxyReadArray, proxyReadArray, readArray, readArray, readToStream, reallyRead, reallyRead, setCaching, showScaleMissingProxy, toString, toStringDebug_readScalarData, addLocalFieldsToBuilder, attributes, compareTo, extraInfo, findAttribute, findAttributeString, findDimensionIndex, getArrayType, getDataType, getDimension, getDimensions, getDimensionSet, getDimensionsString, getElementSize, getEnumTypedef, getFileTypeId, getFullName, getNameAndDimensions, getNameAndDimensions, getParentGroup, getParentStructure, getRanges, getRank, getSection, getShape, getShape, getShapeAsSection, getShortName, getSize, getSizeToCache, getSPobject, hasCachedData, invalidateCache, isCaching, isCoordinateVariable, isMemberOfStructure, isMetadata, isScalar, isUnlimited, isVariableLength, read, read, read, read, read, readScalarByte, readScalarDouble, readScalarFloat, readScalarInt, readScalarLong, readScalarShort, readScalarString, reduce, resetShape, section, section, setCachedData, slice, writeCDLclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetFullName, getParentGroup, getShortNameprotected boolean wasRead
protected double[] coords
protected CoordinateAxis1D(CoordinateAxis1D.Builder<?> builder, Group parentGroup)
public CoordinateAxis1D section(Range r) throws InvalidRangeException
r - the section rangeInvalidRangeException - if IllegalRangepublic String getCoordName(int index)
index - which one ?public double getCoordValue(int index)
index - which coordinate. Between 0 and getNumElements()-1 inclusive.UnsupportedOperationException - if !isNumeric()public double getMinValue()
CoordinateAxisgetMinValue in class CoordinateAxispublic double getMaxValue()
CoordinateAxisgetMaxValue in class CoordinateAxispublic double getMinEdgeValue()
public double getMaxEdgeValue()
public double getCoordEdge(int index)
Coordinate edges must be strictly monotonic:
coordEdge(0) < coordValue(0) < coordEdge(1) < coordValue(1) ...
... coordEdge(i) < coordValue(i) < coordEdge(i+1) < coordValue(i+1) ...
... coordEdge(n-1) < coordValue(n-1) < coordEdge(n)
index - which coordinate. Between 0 and getNumElements() inclusive.UnsupportedOperationException - if !isNumeric()public double[] getCoordValues()
UnsupportedOperationException - if !isNumeric()public double[] getCoordEdges()
UnsupportedOperationException - if !isNumeric()public boolean isContiguous()
CoordinateAxisisContiguous in class CoordinateAxispublic boolean isInterval()
isInterval in class CoordinateAxispublic double[] getBound1()
UnsupportedOperationException - if !isNumeric()public double[] getBound2()
UnsupportedOperationException - if !isNumeric()public double[] getCoordBounds(int i)
i - coordinate indexpublic double getCoordBoundsMidpoint(int i)
public int findCoordElement(double coordVal)
edge[i] <= value < edge[i+1] (if values are ascending) edge[i] > value >= edge[i+1] (if values are descending)
coordVal - position in this coordinate systempublic int findCoordElementBounded(double coordVal)
coordVal - position in this coordinate systempublic double getStart()
public double getIncrement()
public boolean isRegular()
public CoordinateAxis1D correctLongitudeWrap()
protected void readValues()
public CoordinateAxis1D.Builder<?> toBuilder()
VariabletoBuilder in class CoordinateAxisprotected CoordinateAxis1D.Builder<?> addLocalFieldsToBuilder(CoordinateAxis1D.Builder<? extends CoordinateAxis1D.Builder<?>> b)
public static CoordinateAxis1D.Builder<?> builder()