Package uk.ac.rdg.resc.edal.position
Class VerticalCrsImpl
- java.lang.Object
-
- uk.ac.rdg.resc.edal.position.VerticalCrsImpl
-
- All Implemented Interfaces:
Serializable
,VerticalCrs
public class VerticalCrsImpl extends Object implements VerticalCrs
Implementation of aVerticalCrs
- Author:
- Guy
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description VerticalCrsImpl(String units, boolean pressure, boolean dimensionless, boolean positiveUpwards)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
String
getUnits()
Returns the units for the values in thisVerticalCrs
int
hashCode()
boolean
isDimensionless()
Return true if this is a dimensionless (e.g.boolean
isPositiveUpwards()
Indicates whether coordinate values increase upward or downward.boolean
isPressure()
Return true if this axis has units of pressure.String
toString()
-
-
-
Constructor Detail
-
VerticalCrsImpl
public VerticalCrsImpl(String units, boolean pressure, boolean dimensionless, boolean positiveUpwards)
-
-
Method Detail
-
getUnits
public String getUnits()
Description copied from interface:VerticalCrs
Returns the units for the values in thisVerticalCrs
TODO This may need replacing with a stronger type
- Specified by:
getUnits
in interfaceVerticalCrs
-
isPressure
public boolean isPressure()
Description copied from interface:VerticalCrs
Return true if this axis has units of pressure. If this is true then the positive direction must be DOWN.- Specified by:
isPressure
in interfaceVerticalCrs
-
isDimensionless
public boolean isDimensionless()
Description copied from interface:VerticalCrs
Return true if this is a dimensionless (e.g. sigma or terrain-following) coordinate system. If this is true then the units are irrelevant, and isPressure() will return false.
Future APIs will need to allow conversions between dimensionless and dimensional coordinates, which will require more information. (The conversion can be performed using existing routines, e.g. in Java-NetCDF.) However, the current purpose of EDAL is not to perform the conversion but to provide client code with enough information to decide what to do.
- Specified by:
isDimensionless
in interfaceVerticalCrs
- See Also:
- CF conventions
-
isPositiveUpwards
public boolean isPositiveUpwards()
Description copied from interface:VerticalCrs
Indicates whether coordinate values increase upward or downward.- Specified by:
isPositiveUpwards
in interfaceVerticalCrs
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfaceVerticalCrs
- Overrides:
hashCode
in classObject
-
equals
public boolean equals(Object obj)
- Specified by:
equals
in interfaceVerticalCrs
- Overrides:
equals
in classObject
-
-