Category changes for revisions 13331:13332

This commit is not accepted: NaN values can not be replaced by 1. The correct behavior is to state that the scale is unknown or that there is no scale.

Command line:

svn diff --extensions "--unified --ignore-space-change --ignore-all-space --ignore-eol-style" -r13331:13332 https://svn.osgeo.org/geotools/trunk/modules/library/coverage/src/main/java/org/geotools/coverage/Category.java
Revision 13331Revision 13332
    final double maxSample = doubleValue(sType,     sampleValueRange.getMaxValue(), sMaxInc);
    final double minValue  = doubleValue(gType, geophysicsValueRange.getMinValue(), gMinInc);
    final double maxValue  = doubleValue(gType, geophysicsValueRange.getMaxValue(), gMaxInc);
    final double scale     = (maxValue-minValue) / (maxSample-minSample);
    final double offset    = minValue - scale*minSample;
    return createLinearTransform(scale, offset);
}
    final double maxSample = doubleValue(sType,     sampleValueRange.getMaxValue(), sMaxInc);
    final double minValue  = doubleValue(gType, geophysicsValueRange.getMinValue(), gMinInc);
    final double maxValue  = doubleValue(gType, geophysicsValueRange.getMaxValue(), gMaxInc);
    double scale     = (maxValue-minValue) / (maxSample-minSample);
  if(Double.isNaN(scale)&&
   !Double.isNaN(maxValue-minValue)&&
   !Double.isNaN(maxSample-minSample))
     scale=1.0;
    final double offset    = minValue - scale*minSample;
    return createLinearTransform(scale, offset);
}