tds/src/main/java/thredds/server/ncss/controller/NcssGridController.java
protected boolean checkVarsHaveSameVertAxis(CoverageCollection gcd, NcssGridParamsBean params) {
    String zaxisName = null;
    for (String gridName : params.getVar()) {
      Coverage grid = gcd.findCoverage(gridName);
      CoverageCoordAxis zaxis = grid.getCoordSys().getZAxis();
      if (zaxis != null) {
        if (zaxisName == null)
          zaxisName = zaxis.getName();
        else if (!zaxisName.equals(zaxis.getName()))
          return false;
      }
    }
    return true;
  }
protected boolean checkVarsHaveSameVertAxis(CoverageCollection gcd, NcssGridParamsBean params) {
    String zaxisName = null;
    for (String gridName : params.getVar()) {
      Coverage grid = gcd.findCoverage(gridName);
      CoverageCoordAxis zaxis = grid.getCoordSys().getZAxis();
      if (zaxis != null) {
        if (zaxisName == null)
          zaxisName = zaxis.getName();
        else if (!zaxisName.equals(zaxis.getName()))
          return false;
      }
    }
    return true;
  }
protected boolean checkVarsHaveSameVertAxis ( CoverageCollection gcd , NcssGridParamsBean params ) { String zaxisName = null ; for ( String gridName : params . getVar ( ) ) { Coverage grid = gcd . findCoverage ( gridName ) ; CoverageCoordAxis zaxis = grid . getCoordSys ( ) . getZAxis ( ) ; if ( zaxis != null ) { if ( zaxisName == null ) zaxisName = zaxis . getName ( ) ; else if ( ! zaxisName . equals ( zaxis . getName ( ) ) ) return false ; } } return true ; }
Returns true if all the variables have the same vertical axis (if they have an axis).
Could be broadened to allow all with same coordinate unites? coordinate value??
Returns true if all the variables have the same vertical axis ( if they have an axis ) . Could be broadened to allow all with same coordinate unites? coordinate value??