public static void readCfBandAttributes(Variable variable, RasterDataNode rasterDataNode) { rasterDataNode.setDescription(variable.getDescription()); rasterDataNode.setUnit(variable.getUnitsString()); rasterDataNode.setScalingFactor(getScalingFactor(variable)); rasterDataNode.setScalingOffset(getAddOffset(variable)); final Number noDataValue = getNoDataValue(variable); if (noDataValue != null) { rasterDataNode.setNoDataValue(noDataValue.doubleValue()); rasterDataNode.setNoDataValueUsed(true); } }
private void initNode(final int type, final double scalingFactor, final double scalingOffset, final boolean log10scaled) { final Product product = new Product("X", "Y", 10,10); _node = product.addBand("name", type); _node.setScalingFactor(scalingFactor); _node.setScalingOffset(scalingOffset); _node.setLog10Scaled(log10scaled); } }
targetRaster.setDescription(sourceRaster.getDescription()); targetRaster.setUnit(sourceRaster.getUnit()); targetRaster.setScalingFactor(sourceRaster.getScalingFactor()); targetRaster.setScalingOffset(sourceRaster.getScalingOffset()); targetRaster.setLog10Scaled(sourceRaster.isLog10Scaled());