Class TLcdLinearRasterValueConverter

java.lang.Object
com.luciad.format.raster.TLcdLinearRasterValueConverter
All Implemented Interfaces:
ILcdRasterValueConverter

public class TLcdLinearRasterValueConverter extends Object implements ILcdRasterValueConverter

A raster value converter that uses a linear transformation to convert between raster and data values.

When converting from raster values to data values, the following formula is used:
D = (clamp(R, minR, maxR) - O) / S

When converting from data values to raster values, the following formula is used:
R = clamp(D * S + O, minR, maxR)
With:

  • D : the data value
  • R : the raster value
  • minR : the minimum raster value
  • maxR : the maximum raster value
  • O : the offset to apply
  • S : the scale to apply

Since:
2013.0
  • Constructor Details

    • TLcdLinearRasterValueConverter

      public TLcdLinearRasterValueConverter(int aMinRasterValue, int aMaxRasterValue, double aDataToRasterOffset, double aDataToRasterScale, int aDefaultRasterValue, ILcdISO19103UnitOfMeasure aUnit)
      Creates a new raster value converter that uses a linear transformation to convert between raster values and data values. For this it used an offset and a scale parameter. See the class docs for more information about how these parameters are used.
      Parameters:
      aMinRasterValue - the minimal raster value
      aMaxRasterValue - the maximal raster value
      aDataToRasterOffset - the offset to apply.
      aDataToRasterScale - the scale to apply.
      aDefaultRasterValue - the default raster value.
      aUnit - the unit of the data values.
  • Method Details