@Override public Attribute findAttributeIgnoreCase(String name) { for (Attribute att : atts) { if (att.getShortName().equalsIgnoreCase(name)) return att; } return null; }
@Override public Attribute findAttributeIgnoreCase(String name) { for (Attribute att : atts) { if (att.getShortName().equalsIgnoreCase(name)) return att; } return null; }
public ucar.nc2.Attribute findAttributeIgnoreCase(String name) { for (ucar.nc2.Attribute a : attributes) { if (name.equalsIgnoreCase(a.getShortName())) return a; } return null; }
@Override public Attribute findAttributeIgnoreCase(String name) { for (Attribute att : atts) { if (att.getShortName().equalsIgnoreCase(name)) return att; } return null; }
@Override public Attribute findAttributeIgnoreCase(String name) { for (Attribute a : atts) { if (name.equalsIgnoreCase(a.getShortName())) return a; } return null; }
private boolean isBlacklistedAttribute(Attribute att, DataPacking dataPacking) { // part of the blacklist? String shortName = att.getShortName(); if (COPY_ATTRIBUTES_BLACKLIST.contains(shortName)) { return true; } // in case of data packing also valid_min and valid_max should go if (dataPacking != DataPacking.NONE) { return DATA_PACKING_ATTRIBUTES_BLACKLIST.contains(shortName); } return false; }
public ucar.nc2.Attribute findAttributeIgnoreCase(String attName){ Iterator it = attributes.iterator(); Attribute at = null; while(it.hasNext()){ at = (Attribute)it.next(); if(attName.equalsIgnoreCase(at.getShortName())) break; } return at; } }
public ucar.nc2.Attribute findAttributeIgnoreCase(String attName){ Iterator it = attributes.iterator(); Attribute at = null; while(it.hasNext()){ at = (Attribute)it.next(); if(attName.equalsIgnoreCase(at.getShortName())) break; } return at; } }
public Attribute findAttributeIgnoreCase(String name) { for (Attribute att : getAttributes()) if (att.getShortName().equalsIgnoreCase(name)) return att; return null; }
public Attribute findAttributeIgnoreCase(String name) { for (Attribute att : getAttributes()) if (att.getShortName().equalsIgnoreCase(name)) return att; return null; }
/** * Returns the names of all attributes in the given list. */ static List<String> toNames(final List<Attribute> attributes) { final String[] names = new String[attributes.size()]; for (int i=0; i<names.length; i++) { names[i] = attributes.get(i).getShortName(); } return UnmodifiableArrayList.wrap(names); }
public GeoGrid findGridDatatypeByAttribute(String attName, String attValue) { for (GeoGrid ggi : grids) { for (Attribute att : ggi.getAttributes()) if (attName.equals(att.getShortName()) && attValue.equals(att.getStringValue())) return ggi; } return null; }
public GeoGrid findGridDatatypeByAttribute(String attName, String attValue) { for (GeoGrid ggi : grids) { for (Attribute att : ggi.getAttributes()) if (attName.equals(att.getShortName()) && attValue.equals(att.getStringValue())) return ggi; } return null; }
private void createGlobalAttributes() { if (globalAtts != null) { for (Attribute att : globalAtts) { if (att.getShortName().equalsIgnoreCase("cdm_data_type")) continue; if (att.getShortName().equalsIgnoreCase("cdm_datatype")) continue; if (att.getShortName().equalsIgnoreCase("thredds_data_type")) continue; ncfileOut.addAttribute(null, att); } } ncfileOut.addAttribute(null, new Attribute(CDM.CONVENTIONS, "CF-1")); // LOOK CF-1.? ncfileOut.addAttribute(null, new Attribute(CF.FEATURE_TYPE, CF.FeatureType.point.name())); }
private void createGlobalAttributes() { if (globalAtts != null) { for (Attribute att : globalAtts) { if (att.getShortName().equalsIgnoreCase("cdm_data_type")) continue; if (att.getShortName().equalsIgnoreCase("cdm_datatype")) continue; if (att.getShortName().equalsIgnoreCase("thredds_data_type")) continue; ncfileOut.addAttribute(null, att); } } ncfileOut.addAttribute(null, new Attribute(CDM.CONVENTIONS, "CF-1")); // LOOK CF-1.? ncfileOut.addAttribute(null, new Attribute(CF.FEATURE_TYPE, CF.FeatureType.point.name())); }
public static List<Property> convertToProperties(AttributeContainer from) { List<Property> result = new ArrayList<>(); for (Attribute p : from.getAttributes()) result.add(new Property(p.getShortName(), p.getStringValue())); return result; }
private void convertAttribute(Variable ctv, Attribute att, double scalef) { if (att == null) return; double val = scalef * att.getNumericValue().doubleValue(); ctv.addAttribute(new Attribute(att.getShortName(), val)); }
/** * Copy attributes from src to target, skip ones that already exist (by name) * @param src copy from here * @param target copy to here */ static public void transferGroupAttributes(Group src, Group target) { for (Attribute a : src.getAttributes()) { if (null == target.findAttribute(a.getShortName())) target.addAttribute(a); } }
private static void setBandDescription(Variable variable, ModisBandDescription bandDesc, Band band) throws IOException { final String descriptionAttribName = bandDesc.getDescriptionAttribName(); final List<Attribute> attributes = variable.getAttributes(); for (final Attribute attribute : attributes) { if (attribute.getShortName().equalsIgnoreCase(descriptionAttribName)) { final String description = attribute.getStringValue(); band.setDescription(description); return; } } }
private static void setBandPhysicalUnit(Variable variable, ModisBandDescription bandDesc, Band band) throws IOException { final String unitAttribName = bandDesc.getUnitAttribName(); final List<Attribute> attributes = variable.getAttributes(); for (final Attribute attribute : attributes) { if (attribute.getShortName().equalsIgnoreCase(unitAttribName)) { final String unit = attribute.getStringValue(); band.setUnit(unit); return; } } }