/** * Get the String name for the ith level(z) coordinate. * * @param index which level coordinate * @return level name */ public String getLevelName(int index) { if ((vertZaxis == null) || (index < 0) || (index >= vertZaxis.getSize())) throw new IllegalArgumentException("getLevelName = " + index); return vertZaxis.getCoordName(index).trim(); }
/** * Get the String name for the ith level(z) coordinate. * * @param index which level coordinate * @return level name */ public String getLevelName(int index) { if ((vertZaxis == null) || (index < 0) || (index >= vertZaxis.getSize())) throw new IllegalArgumentException("getLevelName = " + index); return vertZaxis.getCoordName(index).trim(); }
/** * Get the String name for the ith level(z) coordinate. * * @param index which level coordinate * @return level name */ public String getLevelName(int index) { if ((vertZaxis == null) || (index < 0) || (index >= vertZaxis.getSize())) throw new IllegalArgumentException("getLevelName = " + index); return vertZaxis.getCoordName(index).trim(); }
/** * Get the index corresponding to the level name. * * @param name level name * @return level index, or -1 if not found */ public int getLevelIndex(String name) { if ((vertZaxis == null) || (name == null)) return -1; for (int i = 0; i < vertZaxis.getSize(); i++) { if (vertZaxis.getCoordName(i).trim().equals(name)) return i; } return -1; }
/** * Get the index corresponding to the level name. * * @param name level name * @return level index, or -1 if not found */ public int getLevelIndex(String name) { if ((vertZaxis == null) || (name == null)) return -1; for (int i = 0; i < vertZaxis.getSize(); i++) { if (vertZaxis.getCoordName(i).trim().equals(name)) return i; } return -1; }
/** * Get the index corresponding to the level name. * * @param name level name * @return level index, or -1 if not found */ public int getLevelIndex(String name) { if ((vertZaxis == null) || (name == null)) return -1; for (int i = 0; i < vertZaxis.getSize(); i++) { if (vertZaxis.getCoordName(i).trim().equals(name)) return i; } return -1; }
/** * Get the list of level names, to be used for user selection. * The ith one refers to the ith level coordinate. * * @return List of ucar.nc2.util.NamedObject, or empty list. */ public List<NamedObject> getLevels() { if (vertZaxis == null) return new ArrayList<>(0); int n = (int) vertZaxis.getSize(); List<NamedObject> levels = new ArrayList<>(n); for (int i = 0; i < n; i++) levels.add(new ucar.nc2.util.NamedAnything(vertZaxis.getCoordName(i), vertZaxis.getUnitsString())); return levels; }
/** * Get the list of level names, to be used for user selection. * The ith one refers to the ith level coordinate. * * @return List of ucar.nc2.util.NamedObject, or empty list. */ public List<NamedObject> getLevels() { if (vertZaxis == null) return new ArrayList<NamedObject>(0); int n = (int) vertZaxis.getSize(); List<NamedObject> levels = new ArrayList<NamedObject>(n); for (int i = 0; i < n; i++) levels.add(new ucar.nc2.util.NamedAnything(vertZaxis.getCoordName(i), vertZaxis.getUnitsString())); return levels; }
/** * Get the list of level names, to be used for user selection. * The ith one refers to the ith level coordinate. * * @return List of ucar.nc2.util.NamedObject, or empty list. */ public List<NamedObject> getLevels() { if (vertZaxis == null) return new ArrayList<>(0); int n = (int) vertZaxis.getSize(); List<NamedObject> levels = new ArrayList<>(n); for (int i = 0; i < n; i++) levels.add(new ucar.nc2.util.NamedAnything(vertZaxis.getCoordName(i), vertZaxis.getUnitsString())); return levels; }
public Axis( CoordinateAxis1D coordAxis) { this.coordAxis = coordAxis; this.name = this.coordAxis.getFullName(); this.label = this.coordAxis.getFullName(); this.description = this.coordAxis.getDescription(); this.isNumeric = this.coordAxis.isNumeric(); this.values = new ArrayList<String>(); for ( int i = 0; i < this.coordAxis.getSize(); i++ ) this.values.add( this.coordAxis.getCoordName( i ).trim() ); }
/** * Get the list of names, to be used for user selection. * The ith one refers to the ith coordinate. * * @return List of ucar.nc2.util.NamedObject, or empty list. */ public List<NamedObject> getNames() { int n = getDimension(0).getLength(); List<NamedObject> names = new ArrayList<>(n); for (int i = 0; i < n; i++) names.add(new ucar.nc2.util.NamedAnything(getCoordName(i), getUnitsString())); return names; }
/** * Get the list of names, to be used for user selection. * The ith one refers to the ith coordinate. * * @return List of ucar.nc2.util.NamedObject, or empty list. */ public List<NamedObject> getNames() { int n = (int) getDimension(0).getLength(); List<NamedObject> names = new ArrayList<NamedObject>(n); for (int i = 0; i < n; i++) names.add(new ucar.nc2.util.NamedAnything(getCoordName(i), getUnitsString())); return names; }
/** * Get the list of names, to be used for user selection. * The ith one refers to the ith coordinate. * * @return List of ucar.nc2.util.NamedObject, or empty list. */ public List<NamedObject> getNames() { int n = getDimension(0).getLength(); List<NamedObject> names = new ArrayList<>(n); for (int i = 0; i < n; i++) names.add(new ucar.nc2.util.NamedAnything(getCoordName(i), getShortName() + " " + getUnitsString())); return names; }
vals.add( zaxis.getCoordName( z ).trim() ); vertAxis = new WcsRangeField.Axis( "Vertical", zaxis.getFullName(), zaxis.getDescription(),