it.geosolutions.jaiext.range.Range.getMin()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(6.1k)|赞(0)|评价(0)|浏览(116)

本文整理了Java中it.geosolutions.jaiext.range.Range.getMin方法的一些代码示例,展示了Range.getMin的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Range.getMin方法的具体详情如下:
包路径:it.geosolutions.jaiext.range.Range
类名称:Range
方法名:getMin

Range.getMin介绍

[英]Returns the minimum bound of the Range
[中]返回范围的最小界限

代码示例

代码示例来源:origin: geotools/geotools

double destinationNoData =
    nodata != null
        ? nodata.getMin().doubleValue()
        : (background != null && background.length > 0)
            ? background[0]

代码示例来源:origin: it.geosolutions.jaiext.utilities/jt-utilities

public NoDataContainer(Range nodataR) {
  this.nodataR = nodataR;
  this.singleValue = nodataR.getMin(true).doubleValue();
  this.array = new double[]{singleValue};
}

代码示例来源:origin: geosolutions-it/jai-ext

public NoDataContainer(Range nodataR) {
  this.nodataR = nodataR;
  this.singleValue = nodataR.getMin(true).doubleValue();
  this.array = new double[]{singleValue};
}

代码示例来源:origin: geotools/geotools

background = nodata.getMin(true).doubleValue();
} else {
  background = 0.0d;

代码示例来源:origin: geotools/geotools

int noDataValue = noData.getMin().intValue();
for (int i = 0; i < 256; i++) {
  if (i == noDataValue) {

代码示例来源:origin: geotools/geotools

new DefaultPiecewiseTransform1DElement[] {p0}, 11);
Assert.assertEquals(piecewise.getApproximateDomainRange().getMin().doubleValue(), 0.0, 0.0);
Assert.assertEquals(piecewise.getApproximateDomainRange().getMax().doubleValue(), 1.0, 0.0);
Assert.assertEquals(piecewise.transform(0.5), 0.5, 0.0);

代码示例来源:origin: geotools/geotools

"destinationNoData", nodata[getIndex(parameters)].getMin().doubleValue());

代码示例来源:origin: stackoverflow.com

public void clauseMinMax(String format, Range r) {
 if (r != null) {
   builder.clause(String.format(format, r.getMin(), r.getMax()));
 }
}

代码示例来源:origin: geotools/geotools

&& sBgValues.length > 0
  && sBgValues[0]
      == this.nodata.getMin().doubleValue());
&& this.nodata != null
&& sBgValues.length > 0
&& sBgValues[0] == this.nodata.getMin().doubleValue());

代码示例来源:origin: geotools/geotools

new DefaultPiecewiseTransform1DElement[] {t1}, 12);
Assert.assertEquals(transform.getName().toString(), t1.getName().toString());
Assert.assertEquals(transform.getApproximateDomainRange().getMin().doubleValue(), 1.0, 0.0);
Assert.assertEquals(transform.getApproximateDomainRange().getMax().doubleValue(), 2.0, 0.0);
Assert.assertEquals(transform.transform(1.5), 201, 0.0);

代码示例来源:origin: it.geosolutions.jaiext.utilities/jt-utilities

public static Range convertToByteRange(Range input) {
  // If already double do nothing
  if (input instanceof RangeByte) {
    return input;
  }
  // Otherwise get minimum and maximum values and convert it
  byte min = input.getMin().byteValue();
  byte max = input.getMax().byteValue();
  boolean minIncluded = input.isMinIncluded();
  boolean maxIncluded = input.isMaxIncluded();
  // New Double range
  return new RangeByte(min, minIncluded, max, maxIncluded);
}

代码示例来源:origin: it.geosolutions.jaiext.utilities/jt-utilities

@Override
public int hashCode() {
  int result = 37;
    result += getDataType().getClass().hashCode();
    result = hash(isMaxIncluded, result);
    result = hash(isMinIncluded, result);
    result = hash(getMax().doubleValue(), result);
    result = hash(getMin().doubleValue(), result);
  return result;
}

代码示例来源:origin: geosolutions-it/jai-ext

@Override
public int hashCode() {
  int result = 37;
    result += getDataType().getClass().hashCode();
    result = hash(isMaxIncluded, result);
    result = hash(isMinIncluded, result);
    result = hash(getMax().doubleValue(), result);
    result = hash(getMin().doubleValue(), result);
  return result;
}

代码示例来源:origin: geosolutions-it/jai-ext

public static Range convertToByteRange(Range input) {
  // If already double do nothing
  if (input instanceof RangeByte) {
    return input;
  }
  // Otherwise get minimum and maximum values and convert it
  byte min = input.getMin().byteValue();
  byte max = input.getMax().byteValue();
  boolean minIncluded = input.isMinIncluded();
  boolean maxIncluded = input.isMaxIncluded();
  // New Double range
  return new RangeByte(min, minIncluded, max, maxIncluded);
}

代码示例来源:origin: it.geosolutions.jaiext.utilities/jt-utilities

public static Range convertToFloatRange(Range input) {
  // If already double do nothing
  if (input instanceof RangeFloat) {
    return input;
  }
  // Otherwise get minimum and maximum values and convert it
  float min = input.getMin().floatValue();
  float max = input.getMax().floatValue();
  boolean minIncluded = input.isMinIncluded();
  boolean maxIncluded = input.isMaxIncluded();
  boolean nanIncluded = input.isNanIncluded();
  // New Double range
  return new RangeFloat(min, minIncluded, max, maxIncluded, nanIncluded);
}

代码示例来源:origin: it.geosolutions.jaiext.utilities/jt-utilities

public static Range convertToDoubleRange(Range input) {
  // If already double do nothing
  if (input instanceof RangeDouble) {
    return input;
  }
  // Otherwise get minimum and maximum values and convert it
  double min = input.getMin().doubleValue();
  double max = input.getMax().doubleValue();
  boolean minIncluded = input.isMinIncluded();
  boolean maxIncluded = input.isMaxIncluded();
  boolean nanIncluded = input.isNanIncluded();
  // New Double range
  return new RangeDouble(min, minIncluded, max, maxIncluded, nanIncluded);
}

代码示例来源:origin: geotools/geotools

if (nodata.getMin().doubleValue() != Double.NEGATIVE_INFINITY) {
  builder.add(
      RangeFactory.create(
          Double.NEGATIVE_INFINITY,
          true,
          nodata.getMin().doubleValue(),
          !nodata.isMinIncluded()),
      (byte) 255);

代码示例来源:origin: geosolutions-it/jai-ext

@Test
public void testConvertFloatNaN() {
  Range nanDouble = RangeFactory.create(Double.NaN, Double.NaN);
  Range nanFloat = RangeFactory.convert(nanDouble, DataBuffer.TYPE_FLOAT);
  assertEquals(Float.NaN, nanFloat.getMin());
  assertEquals(Float.NaN, nanFloat.getMax());
}

代码示例来源:origin: geosolutions-it/jai-ext

@Test
  public void testConvertDoubleNaN() {
    Range nanFloat = RangeFactory.create(Float.NaN, Float.NaN);
    Range nanDouble = RangeFactory.convert(nanFloat, DataBuffer.TYPE_DOUBLE);
    assertEquals(Double.NaN, nanDouble.getMin());
    assertEquals(Double.NaN, nanDouble.getMax());
  }
}

代码示例来源:origin: geosolutions-it/jai-ext

private void checkRangeConversion(Range range, int targetType) {
  Range converted = RangeFactory.convert(range, targetType);
  assertEquals(converted.getMin().intValue(), 255);
  assertEquals(converted.getMax().intValue(), 255);
  assertTrue(converted.isMinIncluded);
  assertTrue(converted.isMaxIncluded);
  assertEquals(targetType, converted.getDataType().getDataType());
  if (range.getDataType().getDataType() == targetType) {
    assertSame(range, converted);
  } else {
    assertNotSame(range, converted);
  }
}

相关文章