/** * true if increasing z coordinate values means "up" in altitude */ @Override public boolean isZPositive() { if (vertZaxis == null) return false; if (vertZaxis.getPositive() != null) { return vertZaxis.getPositive().equalsIgnoreCase(ucar.nc2.constants.CF.POSITIVE_UP); } if (vertZaxis.getAxisType() == AxisType.Height) return true; return vertZaxis.getAxisType() != AxisType.Pressure; }
/** * true if increasing z coordinate values means "up" in altitude */ @Override public boolean isZPositive() { if (vertZaxis == null) return false; if (vertZaxis.getPositive() != null) { return vertZaxis.getPositive().equalsIgnoreCase(ucar.nc2.constants.CF.POSITIVE_UP); } if (vertZaxis.getAxisType() == AxisType.Height) return true; return vertZaxis.getAxisType() != AxisType.Pressure; }
/** * true if increasing z coordinate values means "up" in altitude */ @Override public boolean isZPositive() { if (vertZaxis == null) return false; if (vertZaxis.getPositive() != null) { return vertZaxis.getPositive().equalsIgnoreCase(ucar.nc2.constants.CF.POSITIVE_UP); } if (vertZaxis.getAxisType() == AxisType.Height) return true; if (vertZaxis.getAxisType() == AxisType.Pressure) return false; return true; // default }
public Range getRange() throws InvalidRangeException { if ( ! this.coordAxis.isNumeric() ) { log.error( "getRange(): GridCoordSystem must have numeric vertical axis to support min/max range." ); throw new IllegalArgumentException( "GridCoordSystem must have numeric vertical axis to support min/max range." ); } int minIndex = this.coordAxis.findCoordElement( min ); int maxIndex = this.coordAxis.findCoordElement( max ); if ( minIndex == -1 || maxIndex == -1 ) { log.error( "getRange(): GridCoordSystem vertical axis does not contain min/max points." ); throw new IllegalArgumentException( "GridCoordSystem vertical axis does not contain min/max points." ); } if ( this.coordAxis.getPositive().equalsIgnoreCase( ucar.nc2.constants.CF.POSITIVE_DOWN ) ) return new Range( maxIndex, minIndex, stride ); else return new Range( minIndex, maxIndex, stride ); } }
if ( vertAxis.getPositive().equalsIgnoreCase( ucar.nc2.constants.CF.POSITIVE_DOWN ) ) return new Range( maxIndex, minIndex, stride ); else
if ( vertAxis.getPositive().equals( ucar.nc2.constants.CF.POSITIVE_UP ) )
if ( vertAxis.getPositive().equals( ucar.nc2.constants.CF.POSITIVE_UP))