/** * Create standard name from list of axes. Sort the axes first * @param axes list of CoordinateAxis * @return CoordinateSystem name, created from axes names */ static public String makeName( List<CoordinateAxis> axes) { List<CoordinateAxis> axesSorted = new ArrayList<CoordinateAxis>( axes); Collections.sort( axesSorted, new CoordinateAxis.AxisComparator()); StringBuilder buff = new StringBuilder(); for (int i=0; i<axesSorted.size(); i++) { CoordinateAxis axis = axesSorted.get(i); if (i>0) buff.append(" "); buff.append( axis.getFullNameEscaped()); } return buff.toString(); }
/** * Create standard name from list of axes. Sort the axes first * @param axes list of CoordinateAxis * @return CoordinateSystem name, created from axes names */ static public String makeName( List<CoordinateAxis> axes) { List<CoordinateAxis> axesSorted = new ArrayList<>( axes); Collections.sort( axesSorted, new CoordinateAxis.AxisComparator()); StringBuilder buff = new StringBuilder(); for (int i=0; i<axesSorted.size(); i++) { CoordinateAxis axis = axesSorted.get(i); if (i>0) buff.append(" "); buff.append( axis.getFullNameEscaped()); } return buff.toString(); }
/** * Create standard name from list of axes. Sort the axes first * @param axes list of CoordinateAxis * @return CoordinateSystem name, created from axes names */ static public String makeName( List<CoordinateAxis> axes) { List<CoordinateAxis> axesSorted = new ArrayList<>( axes); Collections.sort( axesSorted, new CoordinateAxis.AxisComparator()); StringBuilder buff = new StringBuilder(); for (int i=0; i<axesSorted.size(); i++) { CoordinateAxis axis = axesSorted.get(i); if (i>0) buff.append(" "); buff.append( axis.getFullNameEscaped()); } return buff.toString(); }
private CoordinateSystem findReplacementCs(CoordinateSystem protoCs, String timeDim, NetcdfDataset result) { CoordinateSystem replace = result.findCoordinateSystem(protoCs.getName()); if (replace != null) return replace; List<CoordinateAxis> axes = new ArrayList<>(); for (CoordinateAxis axis : protoCs.getCoordinateAxes()) { CoordinateAxis ra = result.findCoordinateAxis(axis.getFullNameEscaped()); axes.add(ra); } // coord transforms are immutable and can be shared CoordinateSystem cs = new CoordinateSystem(result, axes, protoCs.getCoordinateTransforms()); result.addCoordinateSystem(cs); return cs; }
private CoordinateSystem findReplacementCs(CoordinateSystem protoCs, String timeDim, NetcdfDataset result) { CoordinateSystem replace = result.findCoordinateSystem(protoCs.getName()); if (replace != null) return replace; List<CoordinateAxis> axes = new ArrayList<CoordinateAxis>(); for (CoordinateAxis axis : protoCs.getCoordinateAxes()) { Variable v = result.findCoordinateAxis(axis.getFullNameEscaped()); CoordinateAxis ra; if (v instanceof CoordinateAxis) ra = (CoordinateAxis) v; else { // if not a CoordinateAxis, will turn into one ra = result.addCoordinateAxis((VariableDS) v); if (axis.getAxisType() != null) { ra.setAxisType(axis.getAxisType()); ra.addAttribute(new Attribute(_Coordinate.AxisType, axis.getAxisType().toString())); } } axes.add(ra); } // coord transforms are immutable and can be shared CoordinateSystem cs = new CoordinateSystem(result, axes, protoCs.getCoordinateTransforms()); result.addCoordinateSystem(cs); return cs; }
private CoordinateSystem findReplacementCs(CoordinateSystem protoCs, String timeDim, NetcdfDataset result) { CoordinateSystem replace = result.findCoordinateSystem(protoCs.getName()); if (replace != null) return replace; List<CoordinateAxis> axes = new ArrayList<CoordinateAxis>(); for (CoordinateAxis axis : protoCs.getCoordinateAxes()) { Variable v = result.findCoordinateAxis(axis.getFullNameEscaped()); CoordinateAxis ra; if (v instanceof CoordinateAxis) ra = (CoordinateAxis) v; else { // if not a CoordinateAxis, will turn into one ra = result.addCoordinateAxis((VariableDS) v); if (axis.getAxisType() != null) { ra.setAxisType(axis.getAxisType()); ra.addAttribute(new Attribute(_Coordinate.AxisType, axis.getAxisType().toString())); } } axes.add(ra); } // coord transforms are immutable and can be shared CoordinateSystem cs = new CoordinateSystem(result, axes, protoCs.getCoordinateTransforms()); result.addCoordinateSystem(cs); return cs; }
Variable newV = writer.findVariable(axis.getFullNameEscaped()); if ((axis.getAxisType() == AxisType.Height) || (axis.getAxisType() == AxisType.Pressure) || (axis.getAxisType() == AxisType.GeoZ)) { if (null != axis.getPositive())
Variable newV = writer.findVariable(axis.getFullNameEscaped()); if ((axis.getAxisType() == AxisType.Height) || (axis.getAxisType() == AxisType.Pressure) || (axis.getAxisType() == AxisType.GeoZ)) { if (null != axis.getPositive())
Variable newV = writer.findVariable(axis.getFullNameEscaped()); if ((axis.getAxisType() == AxisType.Height) || (axis.getAxisType() == AxisType.Pressure) || (axis.getAxisType() == AxisType.GeoZ)) { if (null != axis.getPositive())
Variable coordV = result.findVariable(axis.getFullNameEscaped()); if ((axis.getAxisType() == AxisType.Height) || (axis.getAxisType() == AxisType.Pressure) || (axis.getAxisType() == AxisType.GeoZ)) { if (null != axis.getPositive())
Variable newV = writer.findVariable(axis.getFullNameEscaped()); if ((axis.getAxisType() == AxisType.Height) || (axis.getAxisType() == AxisType.Pressure) || (axis.getAxisType() == AxisType.GeoZ)) { if (null != axis.getPositive())
Variable newV = writer.findVariable(axis.getFullNameEscaped()); if ((axis.getAxisType() == AxisType.Height) || (axis.getAxisType() == AxisType.Pressure) || (axis.getAxisType() == AxisType.GeoZ)) { if (null != axis.getPositive())
Variable coordV = result.findVariable(axis.getFullNameEscaped()); if ((axis.getAxisType() == AxisType.Height) || (axis.getAxisType() == AxisType.Pressure) || (axis.getAxisType() == AxisType.GeoZ)) { if (null != axis.getPositive())
Variable coordV = result.findVariable(axis.getFullNameEscaped()); if ((axis.getAxisType() == AxisType.Height) || (axis.getAxisType() == AxisType.Pressure) || (axis.getAxisType() == AxisType.GeoZ)) { if (null != axis.getPositive())