@Override public CoordinateAxis getTaxis() { return cs.getTaxis(); }
private String getTimeAttribute(CoordinateSystem cs) { CoordinateAxis timeAxis = cs.getTaxis(); String name = timeAxis != null ? timeAxis.getFullName() : NetCDFUtilities.TIME_DIM; DimensionMapper dimensionMapper = reader.georeferencing.getDimensionMapper(); String timeAttribute = dimensionMapper.getDimension(name.toUpperCase()); if (timeAttribute == null) { // Fallback on standard name timeAttribute = dimensionMapper.getDimension(NetCDFUtilities.TIME_DIM); } return timeAttribute; }
@Override public CoordinateAxis getTaxis() { return cs.getTaxis(); }
@Override public CoordinateAxis getTaxis() { return cs.getTaxis(); }
public double readTimeCoord(Variable fromVar, int[] index) throws IOException, InvalidRangeException { CoordinateAxis axis = cs.getTaxis(); if (null == axis) throw new IllegalArgumentException("There is no time coordinate"); return readValue( axis, fromVar, index); }
public double readTimeCoord(Variable fromVar, int[] index) throws IOException, InvalidRangeException { CoordinateAxis axis = cs.getTaxis(); if (null == axis) throw new IllegalArgumentException("There is no time coordinate"); return readValue( axis, fromVar, index); }
private String getTimeAttribute(CoordinateSystem cs) { CoordinateAxis timeAxis = cs.getTaxis(); String name = timeAxis.getFullName(); String timeAttribute = reader.dimensionsMapping.get(name.toUpperCase()); if (timeAttribute == null) { timeAttribute = reader.dimensionsMapping.get(UnidataUtilities.TIME_DIM); } return timeAttribute; }
/** Create a RadialCoordSys from an existing Coordinate System. */ public RadialCoordSys( CoordinateSystem cs) { super(); aziAxis = cs.getAzimuthAxis(); radialAxis = cs.getRadialAxis(); elevAxis = cs.getElevationAxis(); timeAxis = cs.getTaxis(); coordAxes.add( aziAxis); coordAxes.add( radialAxis); coordAxes.add( elevAxis); // make name based on coordinate Collections.sort( coordAxes, new CoordinateAxis.AxisComparator()); // canonical ordering of axes this.name = CoordinateSystem.makeName( coordAxes); }
/** Create a RadialCoordSys from an existing Coordinate System. */ public RadialCoordSys( CoordinateSystem cs) { super(); aziAxis = cs.getAzimuthAxis(); radialAxis = cs.getRadialAxis(); elevAxis = cs.getElevationAxis(); timeAxis = cs.getTaxis(); coordAxes.add( aziAxis); coordAxes.add( radialAxis); coordAxes.add( elevAxis); // make name based on coordinate Collections.sort( coordAxes, new CoordinateAxis.AxisComparator()); // canonical ordering of axes this.name = CoordinateSystem.makeName( coordAxes); }
/** Create a RadialCoordSys from an existing Coordinate System. */ public RadialCoordSys( CoordinateSystem cs) { super(); aziAxis = cs.getAzimuthAxis(); radialAxis = cs.getRadialAxis(); elevAxis = cs.getElevationAxis(); timeAxis = cs.getTaxis(); coordAxes.add( aziAxis); coordAxes.add( radialAxis); coordAxes.add( elevAxis); // make name based on coordinate Collections.sort( coordAxes, new CoordinateAxis.AxisComparator()); // canonical ordering of axes this.name = CoordinateSystem.makeName( coordAxes); }
private String getTimeAttribute(CoordinateSystem cs) { CoordinateAxis timeAxis = cs.getTaxis(); String name = timeAxis != null ? timeAxis.getFullName() : NetCDFUtilities.TIME_DIM; DimensionMapper dimensionMapper = reader.georeferencing.getDimensionMapper(); String timeAttribute = dimensionMapper.getDimension(name.toUpperCase()); if (timeAttribute == null) { // Fallback on standard name timeAttribute = dimensionMapper.getDimension(NetCDFUtilities.TIME_DIM); } return timeAttribute; }
private boolean isSwath(java.util.List<CoordinateSystem> csysList) { CoordinateSystem use = null; for (CoordinateSystem csys : csysList) { if (use == null) use = csys; else if (csys.getCoordinateAxes().size() > use.getCoordinateAxes().size()) use = csys; } if (use == null) return false; CoordinateAxis lat = use.getLatAxis(); CoordinateAxis lon = use.getLonAxis(); CoordinateAxis time = use.getTaxis(); if ((lat == null) || (lat.getRank() != 2)) return false; if ((lon == null) || (lon.getRank() != 2)) return false; if ((time == null)) return false; // must have time - otherwise it can be a grid // lat/lon must have the same dimensions if (!lat.getDimension(0).equals(lon.getDimension(0))) return false; if (!lat.getDimension(1).equals(lon.getDimension(1))) return false; Set<Dimension> dims = new HashSet<Dimension>(10); for (Dimension d : lat.getDimensions()) dims.add(d); for (Dimension d : lon.getDimensions()) dims.add(d); // diff with grid - time dimension(s) are a subset of lat/lon dimensions for (Dimension d : time.getDimensions()) { if (!dims.contains(d)) return false; } return true; }
private boolean isSwath(java.util.List<CoordinateSystem> csysList) { CoordinateSystem use = null; for (CoordinateSystem csys : csysList) { if (use == null) use = csys; else if (csys.getCoordinateAxes().size() > use.getCoordinateAxes().size()) use = csys; } if (use == null) return false; CoordinateAxis lat = use.getLatAxis(); CoordinateAxis lon = use.getLonAxis(); CoordinateAxis time = use.getTaxis(); if ((lat == null) || (lat.getRank() != 2)) return false; if ((lon == null) || (lon.getRank() != 2)) return false; if ((time == null)) return false; // must have time - otherwise it can be a grid // lat/lon must have the same dimensions if (!lat.getDimension(0).equals(lon.getDimension(0))) return false; if (!lat.getDimension(1).equals(lon.getDimension(1))) return false; Set<Dimension> dims = new HashSet<Dimension>(10); for (Dimension d : lat.getDimensions()) dims.add(d); for (Dimension d : lon.getDimensions()) dims.add(d); // diff with grid - time dimension(s) are a subset of lat/lon dimensions for (Dimension d : time.getDimensions()) { if (!dims.contains(d)) return false; } return true; }
CoordinateAxis t = cs.getTaxis(); if (t != null) {
CoordinateAxis t = cs.getTaxis(); CoordinateAxis rt = cs.findAxis(AxisType.RunTime);
CoordinateAxis t = cs.getTaxis(); if (t != null) {
CoordinateAxis t = cs.getTaxis(); if ((t != null) && t.getRank() > 1) { // If time axis is two-dimensional... if (rtAxis != null && rtAxis.getRank() == 1) {
csElem.setAttribute("vertical", gcs.getVerticalAxis().getFullName()); if (gcs.hasTimeAxis()) csElem.setAttribute("time", cs.getTaxis().getFullName()); } else { csElem = new Element("coordSystem");
csElem.setAttribute("vertical", gcs.getVerticalAxis().getFullName()); if (gcs.hasTimeAxis()) csElem.setAttribute("time", cs.getTaxis().getFullName()); } else { csElem = new Element("coordSystem");
csElem.setAttribute("vertical", gcs.getVerticalAxis().getFullName()); if (gcs.hasTimeAxis()) csElem.setAttribute("time", cs.getTaxis().getFullName()); } else { csElem = new Element("coordSystem");