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; }
final int axisDimensions = axis.getDimensions().size(); if (axisDimensions > 0 && axisDimensions < 3) { String axisName = axis.getFullName(); if (axis.getAxisType() != null) { coordinates.put(axisName, CoordinateVariable.create(axis));
for (CoordinateAxis axis : cs.getCoordinateAxes()) { String axisName = axis.getFullName(); if (NetCDFUtilities.getIgnoredDimensions().contains(axisName)) { continue;
for (CoordinateAxis axis : axesSorted) { index++; String fullName = axis.getFullName(); if (NetCDFUtilities.getIgnoredDimensions().contains(fullName)) { ignoredDimensions.add(fullName);
try { if (zAxis != null) { String axisName = zAxis.getFullName(); if (!NetCDFCRSUtilities.VERTICAL_AXIS_NAMES.contains(axisName)) { return null;
String axisName = coordinateAxis.getFullName(); try { String t_csName = "time_CS";
private int compareAxis(CoordinateAxis axis1, CoordinateAxis axis2) { if (axis1 == axis2) return 0; if (axis1 == null) return -1; if (axis2 == null) return 1; return axis1.getFullName().compareTo(axis2.getFullName()); }
private int compareAxis(CoordinateAxis axis1, CoordinateAxis axis2) { if (axis1 == axis2) return 0; if (axis1 == null) return -1; if (axis2 == null) return 1; return axis1.getFullName().compareTo(axis2.getFullName()); }
private int compareAxis(CoordinateAxis axis1, CoordinateAxis axis2) { if (axis1 == axis2) return 0; if (axis1 == null) return -1; if (axis2 == null) return 1; return axis1.getFullName().compareTo(axis2.getFullName()); }
/** * Do we have the named axis? * @param axisName (full unescaped) name of axis * @return true if we have an axis of that name */ public boolean containsAxis(String axisName) { for (CoordinateAxis ca : coordAxes) { if (ca.getFullName().equals(axisName)) return true; } return false; }
private void addCoordinateAxis(GridCoordSystem gcs, List<String> varNameList, List<Variable> varList, List<CoordinateAxis> axisList) { for (CoordinateAxis axis : gcs.getCoordinateAxes()) { if (!varNameList.contains(axis.getFullName())) { varNameList.add(axis.getFullName()); varList.add(axis); // LOOK axis hasnt been subset yet !! axisList.add(axis); //if (timeAxis != null && timeAxis.isInterval()) { // LOOK gotta add the bounds !!! //} } } }
private void addCoordinateAxis(GridCoordSystem gcs, List<String> varNameList, List<Variable> varList, List<CoordinateAxis> axisList) { for (CoordinateAxis axis : gcs.getCoordinateAxes()) { if (!varNameList.contains(axis.getFullName())) { varNameList.add(axis.getFullName()); varList.add(axis); axisList.add(axis); //if (timeAxis != null && timeAxis.isInterval()) { // LOOK gotta add the bounds !!! //} } } }
private void addCoordinateAxis(GridCoordSystem gcs, List<String> varNameList, List<Variable> varList, List<CoordinateAxis> axisList) { for (CoordinateAxis axis : gcs.getCoordinateAxes()) { if (!varNameList.contains(axis.getFullName())) { varNameList.add(axis.getFullName()); varList.add(axis); axisList.add(axis); //if (timeAxis != null && timeAxis.isInterval()) { // LOOK gotta add the bounds !!! //} } } }
private void addCoordinateAxis(GridCoordSystem gcs, List<String> varNameList, List<Variable> varList, List<CoordinateAxis> axisList) { for (CoordinateAxis axis : gcs.getCoordinateAxes()) { if (!varNameList.contains(axis.getFullName())) { varNameList.add(axis.getFullName()); varList.add(axis); axisList.add(axis); //if (timeAxis != null && timeAxis.isInterval()) { // LOOK gotta add the bounds !!! //} } } }
/** * Do we have all the axes in the list? * @param wantAxes List of CoordinateAxis * @return true if all in our list. */ public boolean containsAxes(List<CoordinateAxis> wantAxes) { for (CoordinateAxis ca : wantAxes) { if (!containsAxis(ca.getFullName())) return false; } return true; }
/** * 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(); }
/** * Do we have all the axes in the list? * @param wantAxes List of CoordinateAxis * @return true if all in our list. */ public boolean containsAxes(List<CoordinateAxis> wantAxes) { for (CoordinateAxis ca : wantAxes) { if (!containsAxis(ca.getFullName())) return false; } return true; }
/** * 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(); }
private String makeCoordinatesAttribute(GridCoordSystem gcs, String timeDimName) { Formatter sb = new Formatter(); if (gcs.getXHorizAxis() != null) sb.format("%s ", gcs.getXHorizAxis().getFullName()); if (gcs.getYHorizAxis() != null) sb.format("%s ", gcs.getYHorizAxis().getFullName()); if (gcs.getVerticalAxis() != null) sb.format("%s ", gcs.getVerticalAxis().getFullName()); sb.format("%s ", timeDimName); return sb.toString(); }