/** * Clears the no-data value, so that {@link #isNoDataValueSet()} will return <code>false</code>. */ public void clearNoDataValue() { noData = null; setGeophysicalNoDataValue(); }
/** * Sets whether or not the {@link <code>ProductData</code>} of this band has a negative binominal distribution and * thus the common logarithm (base 10) of the values is stored in the raw data. * * @param log10Scaled whether or not the data is logging-10 scaled * @see #isScalingApplied() */ public final void setLog10Scaled(boolean log10Scaled) { if (this.log10Scaled != log10Scaled) { this.log10Scaled = log10Scaled; setScalingApplied(); resetGeophysicalImage(); setGeophysicalNoDataValue(); resetValidMask(); fireProductNodeChanged(PROPERTY_NAME_LOG_10_SCALED); setModified(true); } }
/** * Sets the scaling factor which is applied to raw {@link <code>ProductData</code>}. * * @param scalingFactor the scaling factor * @see #isScalingApplied() */ public final void setScalingFactor(double scalingFactor) { if (this.scalingFactor != scalingFactor) { this.scalingFactor = scalingFactor; setScalingApplied(); resetGeophysicalImage(); fireProductNodeChanged(PROPERTY_NAME_SCALING_FACTOR); setGeophysicalNoDataValue(); resetValidMask(); setModified(true); } }
/** * Sets the scaling offset which is applied to raw {@link <code>ProductData</code>}. * * @param scalingOffset the scaling offset * @see #isScalingApplied() */ public final void setScalingOffset(double scalingOffset) { if (this.scalingOffset != scalingOffset) { this.scalingOffset = scalingOffset; setScalingApplied(); resetGeophysicalImage(); fireProductNodeChanged(PROPERTY_NAME_SCALING_OFFSET); setGeophysicalNoDataValue(); resetValidMask(); setModified(true); } }
public void testSetRawNoDataValue_SetNoDataValue_UByte_WithScalingLikeAlgal_MER_RR__2P() { short noDataValue; double geophysNoDataValue; initNode(ProductData.TYPE_UINT8, 0.023622047156095505, -3.0236220359802246, true); noDataValue = 214; _node.setNoDataValue(noDataValue); geophysNoDataValue = _node.getGeophysicalNoDataValue(); _node.setGeophysicalNoDataValue(4f); _node.setGeophysicalNoDataValue(geophysNoDataValue); assertEquals("Expected "+ noDataValue+" but was " + _node.getNoDataValue(), true, noDataValue == _node.getNoDataValue()); noDataValue = 120; _node.setNoDataValue(noDataValue); geophysNoDataValue = _node.getGeophysicalNoDataValue(); _node.setGeophysicalNoDataValue(4f); _node.setGeophysicalNoDataValue(geophysNoDataValue); assertEquals("Expected "+ noDataValue+" but was " + _node.getNoDataValue(), true, noDataValue == _node.getNoDataValue()); }
public void testSetRawNoDataValue_SetNoDataValue_UShort_WithScalingLikeReflec_MER_RR__2P() { int noDataValue; double geophysNoDataValue; initNode(ProductData.TYPE_UINT16, 1.5259255E-5, -1.5259255E-5, false); noDataValue = 1214; _node.setNoDataValue(noDataValue); geophysNoDataValue = _node.getGeophysicalNoDataValue(); _node.setGeophysicalNoDataValue(4f); _node.setGeophysicalNoDataValue(geophysNoDataValue); assertEquals("Expected "+ noDataValue+" but was " + _node.getNoDataValue(), true, noDataValue == _node.getNoDataValue()); noDataValue = 120; _node.setNoDataValue(noDataValue); geophysNoDataValue = _node.getGeophysicalNoDataValue(); _node.setGeophysicalNoDataValue(4f); _node.setGeophysicalNoDataValue(geophysNoDataValue); assertEquals("Expected "+ noDataValue+" but was " + _node.getNoDataValue(), true, noDataValue == _node.getNoDataValue()); }
public void testSetRawNoDataValue_SetNoDataValue_UShort_WithScalingLikeTotalSusp_MER_RR__2P() { int noDataValue; double geophysNoDataValue; initNode(ProductData.TYPE_UINT16, 0.015748031, -2.015748, true); noDataValue = 1214; _node.setNoDataValue(noDataValue); geophysNoDataValue = _node.getGeophysicalNoDataValue(); _node.setGeophysicalNoDataValue(4f); _node.setGeophysicalNoDataValue(geophysNoDataValue); assertEquals("Expected "+ noDataValue+" but was " + _node.getNoDataValue(), true, noDataValue == _node.getNoDataValue()); noDataValue = 120; _node.setNoDataValue(noDataValue); geophysNoDataValue = _node.getGeophysicalNoDataValue(); _node.setGeophysicalNoDataValue(4f); _node.setGeophysicalNoDataValue(geophysNoDataValue); assertEquals("Expected "+ noDataValue+" but was " + _node.getNoDataValue(),true, noDataValue == _node.getNoDataValue()); }
public void testSetRawNoDataValue_SetNoDataValue_UShort_WithScalingLikeRadiance5_MER_RR__1P() { int noDataValue; double geophysNoDataValue; initNode(ProductData.TYPE_UINT16, 0.00940664, 0, false); noDataValue = 1214; _node.setNoDataValue(noDataValue); geophysNoDataValue = _node.getGeophysicalNoDataValue(); _node.setGeophysicalNoDataValue(4f); _node.setGeophysicalNoDataValue(geophysNoDataValue); assertEquals("Expected "+ noDataValue+" but was " + _node.getNoDataValue(), true, noDataValue == _node.getNoDataValue()); noDataValue = 120; _node.setNoDataValue(noDataValue); geophysNoDataValue = _node.getGeophysicalNoDataValue(); _node.setGeophysicalNoDataValue(4f); _node.setGeophysicalNoDataValue(geophysNoDataValue); assertEquals("Expected "+ noDataValue+" but was " + _node.getNoDataValue(),true, noDataValue == _node.getNoDataValue()); }
public void testSetNoDataValue_SetNoDataValue_UByte_WithScalingLinkeAeroOptThick_MER_RR__2P() { short noDataValue; double geophysNoDataValue; initNode(ProductData.TYPE_UINT8, 0.0062992126, -0.0062992126, false); noDataValue = 87; _node.setNoDataValue(noDataValue); geophysNoDataValue = _node.getGeophysicalNoDataValue(); _node.setGeophysicalNoDataValue(4f); _node.setGeophysicalNoDataValue(geophysNoDataValue); assertEquals("Expected "+ noDataValue+" but was " + _node.getNoDataValue(), true, noDataValue == _node.getNoDataValue()); noDataValue = 120; _node.setNoDataValue(noDataValue); geophysNoDataValue = _node.getGeophysicalNoDataValue(); _node.setGeophysicalNoDataValue(4f); _node.setGeophysicalNoDataValue(geophysNoDataValue); assertEquals("Expected "+ noDataValue+" but was " + _node.getNoDataValue(), true, noDataValue == _node.getNoDataValue()); }
setGeophysicalNoDataValue(); if (isNoDataValueUsed()) { resetValidMask();
rasterDataNode.setNoDataValueUsed(noDataValueUsed); if (noDataValueUsed) { rasterDataNode.setGeophysicalNoDataValue((Double) paramNoDataValue.getValue());