/** * Look for Axis by Type. * @param ds look in this dataset's "Best" coordinate system. * @param atype look for this type of CoordinateAxis. takes the first one it finds. * @return the found CoordinateAxis, or null if none */ static public CoordinateAxis findCoordByType(NetcdfDataset ds, AxisType atype) { return findCoordByType(ds, atype, null); }
/** * Search for Axis by Type. * @param ds search in this dataset's "Best" coordinate system. * @param atype search for this type of CoordinateAxis. takes the first one it finds. * @return the found CoordinateAxis, or null if none */ static public CoordinateAxis findCoordByType(NetcdfDataset ds, AxisType atype) { return findCoordByType(ds, atype, null); }
/** * Look for Axis by Type. * @param ds look in this dataset's "Best" coordinate system. * @param atype look for this type of CoordinateAxis. takes the first one it finds. * @return the found CoordinateAxis name, or null if none */ static public String findCoordNameByType(NetcdfDataset ds, AxisType atype) { CoordinateAxis coordAxis = findCoordByType(ds, atype); return coordAxis == null ? null : coordAxis.getFullName(); }
/** * search for Axis by Type. * @param ds search in this dataset's "Best" coordinate system. * @param atype search for this type of CoordinateAxis. takes the first one it finds. * @return the found CoordinateAxis name, or null if none */ static public String findCoordNameByType(NetcdfDataset ds, AxisType atype) { CoordinateAxis coordAxis = findCoordByType(ds, atype); return coordAxis == null ? null : coordAxis.getFullName(); }
/** * Look for Axis by Type. * @param ds look in this dataset's "Best" coordinate system. * @param atype look for this type of CoordinateAxis. takes the first one it finds. * @return the found CoordinateAxis name, or null if none */ static public String findCoordNameByType(NetcdfDataset ds, AxisType atype) { CoordinateAxis coordAxis = findCoordByType(ds, atype); return coordAxis == null ? null : coordAxis.getFullName(); }
protected String matchAxisTypeAndDimension(NetcdfDataset ds, AxisType type, final Dimension outer, final Dimension inner) { Variable var = CoordSysEvaluator.findCoordByType(ds, type, new CoordSysEvaluator.Predicate() { public boolean match(CoordinateAxis axis) { return ((axis.getRank() == 2) && outer.equals(axis.getDimension(0)) && inner.equals(axis.getDimension(1))); } }); if (var == null) return null; return var.getShortName(); }
protected String matchAxisTypeAndDimension(NetcdfDataset ds, AxisType type, final Dimension outer, final Dimension middle, final Dimension inner) { Variable var = CoordSysEvaluator.findCoordByType(ds, type, new CoordSysEvaluator.Predicate() { public boolean match(CoordinateAxis axis) { return ((axis.getRank() == 3) && outer.equals(axis.getDimension(0)) && middle.equals(axis.getDimension(1)) && inner.equals(axis.getDimension(2))); } }); if (var == null) return null; return var.getShortName(); }
protected CoordinateAxis findZAxisNotStationAlt(NetcdfDataset ds) { CoordinateAxis z = CoordSysEvaluator.findCoordByType(ds, AxisType.Height, new NotStationAlt()); if (z != null) return z; z = CoordSysEvaluator.findCoordByType(ds, AxisType.Pressure, new NotStationAlt()); if (z != null) return z; z = CoordSysEvaluator.findCoordByType(ds, AxisType.GeoZ, new NotStationAlt()); return z; }
protected String matchAxisTypeAndDimension(NetcdfDataset ds, AxisType type, final Dimension outer, final Dimension inner) { Variable var = CoordSysEvaluator.findCoordByType(ds, type, new CoordSysEvaluator.Predicate() { @Override public boolean match(CoordinateAxis axis) { return ((axis.getRank() == 2) && outer.equals(axis.getDimension(0)) && inner.equals(axis.getDimension(1))); } }); if (var == null) return null; return var.getShortName(); }
protected CoordinateAxis findZAxisNotStationAlt(NetcdfDataset ds) { CoordinateAxis z = CoordSysEvaluator.findCoordByType(ds, AxisType.Height, new NotStationAlt()); if (z != null) return z; z = CoordSysEvaluator.findCoordByType(ds, AxisType.Pressure, new NotStationAlt()); if (z != null) return z; z = CoordSysEvaluator.findCoordByType(ds, AxisType.GeoZ, new NotStationAlt()); return z; }
protected String matchAxisTypeAndDimension(NetcdfDataset ds, AxisType type, final Dimension outer, final Dimension middle, final Dimension inner) { Variable var = CoordSysEvaluator.findCoordByType(ds, type, new CoordSysEvaluator.Predicate() { @Override public boolean match(CoordinateAxis axis) { return ((axis.getRank() == 3) && outer.equals(axis.getDimension(0)) && middle.equals(axis.getDimension(1)) && inner.equals(axis.getDimension(2))); } }); if (var == null) return null; return var.getShortName(); }
static public String findCoordShortNameByType(NetcdfDataset ds, AxisType atype) { CoordinateAxis coordAxis = findCoordByType(ds, atype); return coordAxis == null ? null : coordAxis.getShortName(); }
protected String matchAxisTypeAndDimension(NetcdfDataset ds, AxisType type, final Dimension outer) { Variable var = CoordSysEvaluator.findCoordByType(ds, type, new CoordSysEvaluator.Predicate() { public boolean match(CoordinateAxis axis) { if ((outer == null) && (axis.getRank() == 0)) return true; if ((outer != null) && (axis.getRank() == 1) && (outer.equals(axis.getDimension(0)))) return true; return false; } }); if (var == null) return null; return var.getShortName(); }
static public String findCoordShortNameByType(NetcdfDataset ds, AxisType atype, Predicate p) { CoordinateAxis coordAxis = findCoordByType(ds, atype, p); return coordAxis == null ? null : coordAxis.getShortName(); }
protected String matchAxisTypeAndDimension(NetcdfDataset ds, AxisType type, final Dimension outer, final Dimension middle, final Dimension inner) { Variable var = CoordSysEvaluator.findCoordByType(ds, type, new CoordSysEvaluator.Predicate() { public boolean match(CoordinateAxis axis) { return ((axis.getRank() == 3) && outer.equals(axis.getDimension(0)) && middle.equals(axis.getDimension(1)) && inner.equals(axis.getDimension(2))); } }); if (var == null) return null; return var.getShortName(); }
static public String findCoordShortNameByType(NetcdfDataset ds, AxisType atype, Predicate p) { CoordinateAxis coordAxis = findCoordByType(ds, atype, p); return coordAxis == null ? null : coordAxis.getShortName(); }
protected String matchAxisTypeAndDimension(NetcdfDataset ds, AxisType type, final Dimension outer, final Dimension inner) { Variable var = CoordSysEvaluator.findCoordByType(ds, type, new CoordSysEvaluator.Predicate() { public boolean match(CoordinateAxis axis) { return ((axis.getRank() == 2) && outer.equals(axis.getDimension(0)) && inner.equals(axis.getDimension(1))); } }); if (var == null) return null; return var.getShortName(); }
/** * Look for Dimension used by axis of given by Type. * @param ds look in this dataset's "Best" coordinate system. * @param atype look for this type of CoordinateAxis. takes the first one it finds. * @return the found CoordinateAxis' first Dimension, or null if none or scalar */ static public Dimension findDimensionByType(NetcdfDataset ds, AxisType atype) { CoordinateAxis axis = findCoordByType(ds, atype); if (axis == null) return null; if (axis.isScalar()) return null; return axis.getDimension(0); }
/** * Look for Axis by Type. * @param ds look in this dataset's "Best" coordinate system. * @param atype look for this type of CoordinateAxis. takes the first one it finds. * @return the found CoordinateAxis' first Dimension, or null if none or scalar */ static public Dimension findDimensionByType(NetcdfDataset ds, AxisType atype) { CoordinateAxis axis = findCoordByType(ds, atype); if (axis == null) return null; if (axis.isScalar()) return null; return axis.getDimension(0); }
/** * search for Dimension used by axis of given by Type. * @param ds search in this dataset's "Best" coordinate system. * @param atype search for this type of CoordinateAxis. takes the first one it finds. * @return the found CoordinateAxis' first Dimension, or null if none or scalar */ static public Dimension findDimensionByType(NetcdfDataset ds, AxisType atype) { CoordinateAxis axis = findCoordByType(ds, atype); if (axis == null) return null; if (axis.isScalar()) return null; return axis.getDimension(0); }