private String getDisplayDescription(RasterDataNode rasterDataNode) { final String fullName = multipleProducts ? rasterDataNode.getDisplayName() : rasterDataNode.getName(); final StringBuilder description = new StringBuilder(); description.setLength(0); description.append(fullName); description.append(rasterDataNode.getDescription() == null ? "" : " (" + rasterDataNode.getDescription()); if (rasterDataNode instanceof Band) { if (((Band) rasterDataNode).getSpectralWavelength() > 0.0) { description.append(" ("); description.append(((Band) rasterDataNode).getSpectralWavelength()); description.append(" nm)"); } } description.append(")"); return description.toString(); }
private static void writedescription(PrintWriter out, RasterDataNode rasterDataNode) { assert rasterDataNode != null; String description = rasterDataNode.getDescription(); String unit = rasterDataNode.getUnit(); if (unit == null || unit.trim().length() == 0) {
private String getSuitableBitmaskDefDescription(Term.Ref ref) { String description = null; final String symbolName = ref.getSymbol().getName(); if (isFlagSymbol(symbolName)) { final String[] strings = StringUtils.split(symbolName, new char[]{'.'}, true); final String nodeName = strings[0]; final String flagName = strings[1]; final RasterDataNode rasterDataNode = getRasterDataNode(nodeName); if (rasterDataNode instanceof Band) { final FlagCoding flagCoding = ((Band) rasterDataNode).getFlagCoding(); if (flagCoding != null) { final MetadataAttribute attribute = flagCoding.getAttribute(flagName); if (attribute != null) { description = attribute.getDescription(); } } } } else { final RasterDataNode rasterDataNode = getRasterDataNode(symbolName); if (rasterDataNode != null) { description = rasterDataNode.getDescription(); } } return description; }
public static void writeCfBandAttributes(RasterDataNode rasterDataNode, NVariable variable) throws IOException { final String description = rasterDataNode.getDescription(); if (description != null) { variable.addAttribute("long_name", description);
final KmlFolder folder = new KmlFolder(refRaster.getName(), refRaster.getDescription()); for (RasterDataNode raster : bands) { final GeoCoding geoCoding = raster.getGeoCoding();
} else { name = raster.getName(); description = raster.getDescription() + "\n" + product.getName(); legendKml = " <ScreenOverlay>\n" + " <name>Legend</name>\n"
targetBand.setNoDataValue(targetNoDataValue.doubleValue()); targetBand.setNoDataValueUsed(true); targetBand.setDescription(sourceRaster.getDescription()); targetBand.setUnit(sourceRaster.getUnit());
targetRaster.setDescription(sourceRaster.getDescription()); targetRaster.setUnit(sourceRaster.getUnit()); targetRaster.setScalingFactor(sourceRaster.getScalingFactor());