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 .