public class CoordinateSystem extends Object
Mathematically it is a vector function F from index space to Sn: F(i,j,k,...) -> (S1, S2, ...Sn) where i,j,k are integers, and S is the set of reals (R) or Strings.The components of F are just its coordinate axes:
F = (A1, A2, ...An)
A1(i,j,k,...) -> S1
A2(i,j,k,...) -> S2
An(i,j,k,...) -> Sn
Concretely, a CoordinateSystem is a set of coordinate axes, and an optional set
of coordinate transforms.
The domain rank of F is the number of dimensions it is a function of. The range rank is the number
of coordinate axes.
An important class of CoordinateSystems are georeferencing Coordinate Systems, that locate a Variable's values in space and time. A CoordinateSystem that has a Lat and Lon axis, or a GeoX and GeoY axis and a Projection CoordinateTransform will have isGeoReferencing() true. A CoordinateSystem that has a Height, Pressure, or GeoZ axis will have hasVerticalAxis() true.
Further CoordinateSystems specialization is done by "data type specific" classes such as ucar.nc2.ft2.coverage.grid.GridCoordSys.
| Modifier and Type | Class and Description |
|---|---|
static class |
CoordinateSystem.Builder<T extends CoordinateSystem.Builder<T>> |
| Modifier and Type | Field and Description |
|---|---|
protected CoordinateAxis |
aziAxis |
protected List<CoordinateAxis> |
coordAxes |
protected List<CoordinateTransform> |
coordTrans |
protected String |
dataType |
protected Set<Dimension> |
domain |
protected NetcdfDataset |
ds |
protected CoordinateAxis |
elevAxis |
protected CoordinateAxis |
ensAxis |
protected CoordinateAxis |
hAxis |
protected boolean |
isImplicit |
protected CoordinateAxis |
latAxis |
protected CoordinateAxis |
lonAxis |
protected String |
name |
protected CoordinateAxis |
pAxis |
protected CoordinateAxis |
radialAxis |
protected CoordinateAxis |
tAxis |
protected CoordinateAxis |
xAxis |
protected CoordinateAxis |
yAxis |
protected CoordinateAxis |
zAxis |
| Modifier | Constructor and Description |
|---|---|
protected |
CoordinateSystem()
Deprecated.
Use CoordinateSystem.builder().
|
protected |
CoordinateSystem(CoordinateSystem.Builder<?> builder,
NetcdfDataset ncd,
List<CoordinateAxis> axesAll,
List<CoordinateTransform> allTransforms) |
| Modifier and Type | Method and Description |
|---|---|
protected CoordinateSystem.Builder<?> |
addLocalFieldsToBuilder(CoordinateSystem.Builder<? extends CoordinateSystem.Builder<?>> b) |
static CoordinateSystem.Builder<?> |
builder()
Get a Builder of CoordinateSystem
|
boolean |
containsAxes(List<CoordinateAxis> wantAxes)
Deprecated.
do not use
|
boolean |
containsAxis(String axisFullName)
Deprecated.
do not use
|
boolean |
containsAxisType(AxisType wantAxisType)
Deprecated.
use findAxis(...) != null
|
boolean |
containsAxisTypes(List<AxisType> wantAxes)
Deprecated.
use findAxis(...)
|
boolean |
containsDomain(List<Dimension> wantDimensions)
Deprecated.
do not use
|
static int |
countDomain(Variable[] axes)
Deprecated.
use Dimensions.makeDomain().size()
|
boolean |
equals(Object o) |
CoordinateAxis |
findAxis(AxisType... axisType)
Find CoordinateAxis of one of the given types, in the order given.
|
CoordinateAxis |
findAxis(AxisType type)
Find the CoordinateAxis that has the given AxisType.
|
CoordinateAxis |
getAzimuthAxis()
Deprecated.
use findAxis(AxisType.RadialAzimuth)
|
com.google.common.collect.ImmutableList<CoordinateAxis> |
getCoordinateAxes()
Get the List of CoordinateAxes
|
com.google.common.collect.ImmutableList<CoordinateTransform> |
getCoordinateTransforms()
Deprecated.
use getProjection() or getVerticalCT()
|
com.google.common.collect.ImmutableCollection<Dimension> |
getDomain()
Get the Collection of Dimensions used by any of the CoordinateAxes.
|
CoordinateAxis |
getElevationAxis()
Deprecated.
use findAxis(AxisType.RadialElevation)
|
CoordinateAxis |
getEnsembleAxis()
Deprecated.
use findAxis(AxisType.Ensemble)
|
CoordinateAxis |
getHeightAxis()
Deprecated.
use findAxis(AxisType.Height)
|
CoordinateAxis |
getLatAxis()
Deprecated.
use findAxis(AxisType.Lat)
|
CoordinateAxis |
getLonAxis()
Deprecated.
use findAxis(AxisType.Lon)
|
String |
getName()
Get the name of the Coordinate System
|
NetcdfDataset |
getNetcdfDataset()
Deprecated.
do not use
|
CoordinateAxis |
getPressureAxis()
Deprecated.
use findAxis(AxisType.Pressure)
|
Projection |
getProjection()
Get the Projection for this coordinate system.
|
ProjectionCT |
getProjectionCT()
Deprecated.
use getProjection()
|
CoordinateAxis |
getRadialAxis()
Deprecated.
use findAxis(AxisType.RadialDistance)
|
int |
getRankDomain()
Deprecated.
use getDomain().size();
|
int |
getRankRange()
Deprecated.
use getCoordinateAxes().size();
|
CoordinateAxis |
getTaxis()
Deprecated.
use findAxis(AxisType.Time)
|
VerticalCT |
getVerticalCT()
Get the Vertical Transform for this coordinate system, if any.
|
CoordinateAxis |
getXaxis()
Deprecated.
use findAxis(AxisType.GeoX)
|
CoordinateAxis |
getYaxis()
Deprecated.
use findAxis(AxisType.GeoY)
|
CoordinateAxis |
getZaxis()
Deprecated.
use findAxis(AxisType.GeoZ)
|
int |
hashCode() |
boolean |
hasTimeAxis()
Deprecated.
use findAxis(...)
|
boolean |
hasVerticalAxis()
Deprecated.
use findAxis(...)
|
static boolean |
isComplete(Collection<Dimension> variableDomain,
Collection<Dimension> csysDomain)
True if all variableDomain dimensions are contained in csysDomain, or have length < 2.
|
boolean |
isComplete(Variable v)
Check if this Coordinate System is complete for v, ie if all v's dimensions are used by the Coordinate System.
|
boolean |
isCoordinateSystemFor(Variable v)
Check if this Coordinate System can be used for the given variable, by checking if each CoordinateAxis
can be used for the Variable.
|
boolean |
isGeoReferencing()
true if isGeoXY or isLatLon
|
boolean |
isGeoXY()
true if it has X and Y CoordinateAxis, and a CoordTransform Projection
|
boolean |
isImplicit()
Implicit Coordinate System are constructed based on which Coordinate Variables exist for the Dimensions of the
Variable.
|
boolean |
isLatLon()
true if it has Lat and Lon CoordinateAxis
|
boolean |
isProductSet()
Deprecated.
use GridCoordinateSystem.isProductSet()
|
boolean |
isRadial()
true if it has radial distance and azimuth CoordinateAxis
|
boolean |
isRegular()
Deprecated.
do not use
|
static boolean |
isSubset(Collection<Dimension> subset,
Collection<Dimension> set)
Deprecated.
use Dimensions.isSubset()
|
static boolean |
isSubset(Set<String> subset,
Set<String> set)
Deprecated.
use Dimensions.isSubset()
|
static Set<Dimension> |
makeDomain(Iterable<? extends Variable> axes)
|
static String |
makeName(List<CoordinateAxis> axes)
Create standard name from list of axes.
|
CoordinateSystem.Builder<?> |
toBuilder()
Convert to a mutable Builder.
|
String |
toString() |
protected NetcdfDataset ds
protected List<CoordinateAxis> coordAxes
protected List<CoordinateTransform> coordTrans
protected String name
protected CoordinateAxis xAxis
protected CoordinateAxis yAxis
protected CoordinateAxis zAxis
protected CoordinateAxis tAxis
protected CoordinateAxis latAxis
protected CoordinateAxis lonAxis
protected CoordinateAxis hAxis
protected CoordinateAxis pAxis
protected CoordinateAxis ensAxis
protected CoordinateAxis aziAxis
protected CoordinateAxis elevAxis
protected CoordinateAxis radialAxis
protected boolean isImplicit
protected String dataType
@Deprecated protected CoordinateSystem()
protected CoordinateSystem(CoordinateSystem.Builder<?> builder, NetcdfDataset ncd, List<CoordinateAxis> axesAll, List<CoordinateTransform> allTransforms)
public static String makeName(List<CoordinateAxis> axes)
axes - list of CoordinateAxispublic com.google.common.collect.ImmutableList<CoordinateAxis> getCoordinateAxes()
@Deprecated public com.google.common.collect.ImmutableList<CoordinateTransform> getCoordinateTransforms()
public String getName()
@Deprecated public NetcdfDataset getNetcdfDataset()
public com.google.common.collect.ImmutableCollection<Dimension> getDomain()
@Deprecated public int getRankDomain()
@Deprecated public int getRankRange()
@Nullable public CoordinateAxis findAxis(AxisType type)
type - look for this axisType@Nullable public CoordinateAxis findAxis(AxisType... axisType)
@Deprecated public CoordinateAxis getXaxis()
@Deprecated public CoordinateAxis getYaxis()
@Deprecated public CoordinateAxis getZaxis()
@Deprecated public CoordinateAxis getTaxis()
@Deprecated public CoordinateAxis getLatAxis()
@Deprecated public CoordinateAxis getLonAxis()
@Deprecated public CoordinateAxis getHeightAxis()
@Deprecated public CoordinateAxis getPressureAxis()
@Deprecated public CoordinateAxis getEnsembleAxis()
@Deprecated public CoordinateAxis getAzimuthAxis()
@Deprecated public CoordinateAxis getRadialAxis()
@Deprecated public CoordinateAxis getElevationAxis()
@Deprecated public ProjectionCT getProjectionCT()
@Nullable public Projection getProjection()
@Nullable public VerticalCT getVerticalCT()
public boolean isGeoXY()
public boolean isLatLon()
public boolean isRadial()
public boolean isGeoReferencing()
@Deprecated public boolean isProductSet()
@Deprecated public boolean isRegular()
public boolean isComplete(Variable v)
public static boolean isComplete(Collection<Dimension> variableDomain, Collection<Dimension> csysDomain)
public boolean isCoordinateSystemFor(Variable v)
@Deprecated public static boolean isSubset(Collection<Dimension> subset, Collection<Dimension> set)
subset - is this a subsetset - of this?@Deprecated public static boolean isSubset(Set<String> subset, Set<String> set)
@Deprecated public static Set<Dimension> makeDomain(Iterable<? extends Variable> axes)
@Deprecated public static int countDomain(Variable[] axes)
public boolean isImplicit()
@Deprecated public boolean hasVerticalAxis()
@Deprecated public boolean hasTimeAxis()
@Deprecated public boolean containsAxes(List<CoordinateAxis> wantAxes)
@Deprecated public boolean containsAxis(String axisFullName)
axisFullName - (full unescaped) name of axis@Deprecated public boolean containsDomain(List<Dimension> wantDimensions)
@Deprecated public boolean containsAxisTypes(List<AxisType> wantAxes)
@Deprecated public boolean containsAxisType(AxisType wantAxisType)
wantAxisType - want this AxisTypepublic CoordinateSystem.Builder<?> toBuilder()
protected CoordinateSystem.Builder<?> addLocalFieldsToBuilder(CoordinateSystem.Builder<? extends CoordinateSystem.Builder<?>> b)
public static CoordinateSystem.Builder<?> builder()