public class LinearTransform1D extends AbstractMathTransform implements MathTransform1D, LinearTransform, Serializable
y  =  offset + scale×x This class is the same as a 2×2 affine transform. However, this
 specialized LinearTransform1D class is faster. It is defined there because extensively
 used by GridCoverage2D.
LogarithmicTransform1D, 
ExponentialTransform1D, 
Serialized FormAbstractMathTransform.Inverse| Modifier and Type | Field and Description | 
|---|---|
| static LinearTransform1D | IDENTITYThe identity transform. | 
| double | offsetThe value to add to input values. | 
| double | scaleThe value which is multiplied to input values. | 
SINGLE_LINE| Modifier | Constructor and Description | 
|---|---|
| protected  | LinearTransform1D(double scale,
                 double offset)Constructs a new linear transform. | 
| Modifier and Type | Method and Description | 
|---|---|
| static LinearTransform1D | create(double scale,
      double offset)Constructs a new linear transform. | 
| Matrix | derivative(DirectPosition point)Gets the derivative of this transform at a point. | 
| double | derivative(double value)Gets the derivative of this function at a value. | 
| boolean | equals(Object object)Compares the specified object with this math transform for equality. | 
| Matrix | getMatrix()Returns this transform as an affine transform matrix. | 
| ParameterDescriptorGroup | getParameterDescriptors()Returns the parameter descriptors for this math transform. | 
| ParameterValueGroup | getParameterValues()Returns the matrix elements as a group of parameters values. | 
| int | getSourceDimensions()Gets the dimension of input points, which is 1. | 
| int | getTargetDimensions()Gets the dimension of output points, which is 1. | 
| int | hashCode()Returns a hash value for this transform. | 
| MathTransform1D | inverse()Creates the inverse transform of this object. | 
| boolean | isIdentity()Tests whether this transform does not move any points. | 
| boolean | isIdentity(double tolerance)Tests whether this transform does not move any points by using the provided tolerance. | 
| double | transform(double value)Transforms the specified value. | 
| void | transform(double[] srcPts,
         int srcOff,
         double[] dstPts,
         int dstOff,
         int numPts)Transforms a list of coordinate point ordinal values. | 
| void | transform(float[] srcPts,
         int srcOff,
         float[] dstPts,
         int dstOff,
         int numPts)Transforms a list of coordinate point ordinal values. | 
createTransformedShape, derivative, ensureNonNull, formatWKT, getName, needCopy, normalizeAngle, rollLongitude, transform, transform, transform, transformcleanupThreadLocals, toString, toWKT, toWKT, toWKT, toWKTtoWKT, transform, transform, transformpublic static final LinearTransform1D IDENTITY
public final double scale
public final double offset
protected LinearTransform1D(double scale,
                            double offset)
scale - The scale term in the linear equation.offset - The offset term in the linear equation.public static LinearTransform1D create(double scale, double offset)
scale - The scale term in the linear equation.offset - The offset term in the linear equation.public ParameterDescriptorGroup getParameterDescriptors()
getParameterDescriptors in class AbstractMathTransformnull.OperationMethod.getParameters()public ParameterValueGroup getParameterValues()
getParameterValues in class AbstractMathTransformOperation.getParameterValues()public int getSourceDimensions()
getSourceDimensions in interface MathTransformgetSourceDimensions in class AbstractMathTransformpublic int getTargetDimensions()
getTargetDimensions in interface MathTransformgetTargetDimensions in class AbstractMathTransformpublic Matrix getMatrix()
getMatrix in interface LinearTransformpublic MathTransform1D inverse() throws NoninvertibleTransformException
inverse in interface MathTransforminverse in interface MathTransform1Dinverse in class AbstractMathTransformNoninvertibleTransformException - if the transform can't be inversed.public boolean isIdentity()
isIdentity in interface MathTransformisIdentity in class AbstractMathTransformtrue if this MathTransform is an identity transform; false
     otherwise.public boolean isIdentity(double tolerance)
XMatrix.isIdentity(double).isIdentity in interface LinearTransformtolerance - The tolerance factor.true if this transform is the identity onepublic Matrix derivative(DirectPosition point) throws TransformException
AbstractMathTransform.derivative(java.awt.geom.Point2D) implementation in that no coordinate point
 is required and Double.NaN may be a legal output value for some users.derivative in interface MathTransformderivative in class AbstractMathTransformpoint - The coordinate point where to evaluate the derivative.null).TransformException - if the derivative can't be evaluated at the specified point.public double derivative(double value)
derivative in interface MathTransform1Dvalue - The value where to evaluate the derivative.public double transform(double value)
transform in interface MathTransform1Dvalue - The value to transform.public void transform(float[] srcPts,
                      int srcOff,
                      float[] dstPts,
                      int dstOff,
                      int numPts)
transform in interface MathTransformtransform in class AbstractMathTransformsrcPts - the array containing the source point coordinates.srcOff - the offset to the first point to be transformed in the source array.dstPts - the array into which the transformed point coordinates are returned. May be the
     same than srcPts.dstOff - the offset to the location of the first transformed point that is stored in the
     destination array.numPts - the number of point objects to be transformed.public void transform(double[] srcPts,
                      int srcOff,
                      double[] dstPts,
                      int dstOff,
                      int numPts)
transform in interface MathTransformsrcPts - the array containing the source point coordinates.srcOff - the offset to the first point to be transformed in the source array.dstPts - the array into which the transformed point coordinates are returned. May be the
     same than srcPts.dstOff - the offset to the location of the first transformed point that is stored in the
     destination array.numPts - the number of point objects to be transformed.public int hashCode()
hashCode in class AbstractMathTransformpublic boolean equals(Object object)
equals in class AbstractMathTransformobject - The object to compare with this transform.true if the given object is a transform of the same class and if, given
     identical source position, the transformed position would be the equals.Copyright © 1996–2019 Geotools. All rights reserved.