/** * Does this axis "fit" this variable. * True if all of the dimensions in the axis also appear in the variable. * If char variable, last dimension is left out. * * @param axis check if this axis is ok for the given variable * @param v the given variable * @return true if all of the dimensions in the axis also appear in the variable. */ protected boolean isCoordinateAxisForVariable(Variable axis, VariableEnhanced v) { List<Dimension> varDims = v.getDimensionsAll(); List<Dimension> axisDims = axis.getDimensionsAll(); // a CHAR variable must really be a STRING, so leave out the last (string length) dimension int checkDims = axisDims.size(); if (axis.getDataType() == DataType.CHAR) checkDims--; for (int i = 0; i < checkDims; i++) { Dimension axisDim = axisDims.get(i); if (!varDims.contains(axisDim)) { return false; } } return true; }
/** * Does this axis "fit" this variable. * True if all of the dimensions in the axis also appear in the variable. * If char variable, last dimension is left out. * * @param axis check if this axis is ok for the given variable * @param v the given variable * @return true if all of the dimensions in the axis also appear in the variable. */ protected boolean isCoordinateAxisForVariable(Variable axis, VariableEnhanced v) { List<Dimension> varDims = v.getDimensionsAll(); /* for (Dimension d : varDims) { if (!d.isShared()) return false; // anon cant have coordinates } */ // LOOK // a CHAR variable must really be a STRING, so leave out the last (string length) dimension int checkDims = axis.getRank(); if (axis.getDataType() == DataType.CHAR) checkDims--; for (int i = 0; i < checkDims; i++) { Dimension axisDim = axis.getDimension(i); if (!varDims.contains(axisDim)) { return false; } } return true; }
/** * Does this axis "fit" this variable. * True if all of the dimensions in the axis also appear in the variable. * If char variable, last dimension is left out. * * @param axis check if this axis is ok for the given variable * @param v the given variable * @return true if all of the dimensions in the axis also appear in the variable. */ protected boolean isCoordinateAxisForVariable(Variable axis, VariableEnhanced v) { List<Dimension> varDims = v.getDimensionsAll(); /* for (Dimension d : varDims) { if (!d.isShared()) return false; // anon cant have coordinates } */ // LOOK // a CHAR variable must really be a STRING, so leave out the last (string length) dimension int checkDims = axis.getRank(); if (axis.getDataType() == DataType.CHAR) checkDims--; for (int i = 0; i < checkDims; i++) { Dimension axisDim = axis.getDimension(i); if (!varDims.contains(axisDim)) { return false; } } return true; }
if (!CoordinateSystem.isSubset(v.getDimensionsAll(), testDomain)) { if (sbuff != null) sbuff.format(" NOT complete\n"); return false;
if (!CoordinateSystem.isSubset(v.getDimensionsAll(), testDomain)) { if (sbuff != null) sbuff.format(" NOT complete%n"); return false;
if (!CoordinateSystem.isSubset(v.getDimensionsAll(), testDomain)) { if (sbuff != null) sbuff.format(" NOT complete%n"); return false;