/** * Adds a maximal value for the current sample dimension. If a maximal value was already defined, then * the new value will be set only if it is greater than the existing one. {@code NaN} values are ignored. * If a coverage contains more than one band, additional bands can be created by calling * {@link #newSampleDimension()} before to call this method. * Storage location is: * * <ul> * <li>{@code metadata/contentInfo/attributeGroup/attribute/maxValue}</li> * </ul> * * @param value the maximal value to add to the existing range of sample values, or {@code NaN} for no-operation. */ public final void addMaximumSampleValue(final double value) { if (!Double.isNaN(value)) { final DefaultSampleDimension sampleDimension = sampleDimension(); final Double current = sampleDimension.getMaxValue(); if (current == null || value > current) { sampleDimension.setMaxValue(shared(value)); } } }
/** * Adds a maximal value for the current sample dimension. If a maximal value was already defined, then * the new value will be set only if it is greater than the existing one. {@code NaN} values are ignored. * If a coverage contains more than one band, additional bands can be created by calling * {@link #newSampleDimension()} before to call this method. * Storage location is: * * <ul> * <li>{@code metadata/contentInfo/attributeGroup/attribute/maxValue}</li> * </ul> * * @param value the maximal value to add to the existing range of sample values, or {@code NaN} for no-operation. */ public final void addMaximumSampleValue(final double value) { if (!Double.isNaN(value)) { final DefaultSampleDimension sampleDimension = sampleDimension(); final Double current = sampleDimension.getMaxValue(); if (current == null || value > current) { sampleDimension.setMaxValue(shared(value)); } } }
/** * Initializes this sample dimension to the values of the given object. */ private void init(final DefaultSampleDimension object) { minValue = object.getMinValue(); maxValue = object.getMaxValue(); meanValue = object.getMeanValue(); numberOfValues = object.getNumberOfValues(); standardDeviation = object.getStandardDeviation(); units = object.getUnits(); scaleFactor = object.getScaleFactor(); offset = object.getOffset(); transferFunctionType = object.getTransferFunctionType(); bitsPerValue = object.getBitsPerValue(); nominalSpatialResolution = object.getNominalSpatialResolution(); otherPropertyType = object.getOtherPropertyType(); otherProperty = object.getOtherProperty(); }
/** * Initializes this sample dimension to the values of the given object. */ private void init(final DefaultSampleDimension object) { minValue = object.getMinValue(); maxValue = object.getMaxValue(); meanValue = object.getMeanValue(); numberOfValues = object.getNumberOfValues(); standardDeviation = object.getStandardDeviation(); units = object.getUnits(); scaleFactor = object.getScaleFactor(); offset = object.getOffset(); transferFunctionType = object.getTransferFunctionType(); bitsPerValue = object.getBitsPerValue(); nominalSpatialResolution = object.getNominalSpatialResolution(); otherPropertyType = object.getOtherPropertyType(); otherProperty = object.getOtherProperty(); }