Class ProjectiveTransform2D
java.lang.Object
org.apache.sis.io.wkt.FormattableObject
org.apache.sis.referencing.operation.transform.AbstractMathTransform
org.apache.sis.referencing.operation.transform.AbstractLinearTransform
org.apache.sis.referencing.operation.transform.ProjectiveTransform
org.apache.sis.referencing.operation.transform.ProjectiveTransform2D
- All Implemented Interfaces:
Serializable,ExtendedPrecisionMatrix,LinearTransform2D,Parameterized,LinearTransform,LenientComparable,org.opengis.referencing.operation.MathTransform,org.opengis.referencing.operation.MathTransform2D,org.opengis.referencing.operation.Matrix
Projective transform in 2D case.
This class is used only if the transform is not affine, i.e. the last row in the 3×3 matrix is not [0 0 1].
Otherwise
AffineTransform2D should be used instead
(unless AffineTransform is not available on the target platform).- Since:
- 0.5
- Version:
- 0.7
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.sis.referencing.operation.transform.AbstractMathTransform
AbstractMathTransform.Inverse -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final longFor cross-version compatibility.Fields inherited from class org.apache.sis.referencing.operation.transform.AbstractLinearTransform
inverseFields inherited from class org.apache.sis.referencing.operation.transform.AbstractMathTransform
MAXIMUM_BUFFER_SIZE, MAXIMUM_FAILURESFields inherited from interface org.apache.sis.internal.referencing.ExtendedPrecisionMatrix
IDENTITY, ZERO -
Constructor Summary
ConstructorsConstructorDescriptionProjectiveTransform2D(org.opengis.referencing.operation.Matrix matrix) Creates projective transform from a matrix. -
Method Summary
Modifier and TypeMethodDescriptioncreateTransformedShape(Shape shape) Transforms the specified shape.org.opengis.referencing.operation.Matrixderivative(Point2D point) Gets the derivative of this transform at a point.inverse()Creates the inverse transform of this object.Transforms the specifiedptSrcand stores the result inptDst.Methods inherited from class org.apache.sis.referencing.operation.transform.ProjectiveTransform
computeHashCode, derivative, equalsSameClass, getElement, getExtendedElements, getNumCol, getNumRow, getSourceDimensions, getTargetDimensions, isIdentity, optimize, transform, transform, transform, transform, transformMethods inherited from class org.apache.sis.referencing.operation.transform.AbstractLinearTransform
clone, createInverse, deltaTransform, equals, getMatrix, getParameterDescriptors, getParameterValues, isAffine, setElement, toString, tryConcatenateMethods inherited from class org.apache.sis.referencing.operation.transform.AbstractMathTransform
beforeFormat, equals, formatTo, getContextualParameters, getDomain, hashCode, isInverseEquals, mismatchedDimension, transformMethods inherited from class org.apache.sis.io.wkt.FormattableObject
print, toString, toWKTMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.sis.referencing.operation.transform.LinearTransform
deltaTransform, getMatrix, isAffineMethods inherited from interface org.opengis.referencing.operation.MathTransform
derivative, getSourceDimensions, getTargetDimensions, isIdentity, toWKT, transform, transform, transform, transform, transformMethods inherited from interface org.opengis.referencing.operation.Matrix
clone, setElement
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDFor cross-version compatibility.- See Also:
-
-
Constructor Details
-
ProjectiveTransform2D
ProjectiveTransform2D(org.opengis.referencing.operation.Matrix matrix) Creates projective transform from a matrix.
-
-
Method Details
-
transform
Transforms the specifiedptSrcand stores the result inptDst. Implementation is similar but not identical toAbstractMathTransform2D.transform(Point2D, Point2D). The difference is in thetransform(…)method invoked.- Specified by:
transformin interfaceorg.opengis.referencing.operation.MathTransform2D
-
createTransformedShape
public Shape createTransformedShape(Shape shape) throws org.opengis.referencing.operation.TransformException Transforms the specified shape.- Specified by:
createTransformedShapein interfaceorg.opengis.referencing.operation.MathTransform2D- Throws:
org.opengis.referencing.operation.TransformException
-
derivative
Gets the derivative of this transform at a point.- Specified by:
derivativein interfaceorg.opengis.referencing.operation.MathTransform2D- Parameters:
point- ignored, since derivative of a linear transform is the same everywhere.- Returns:
- the derivative at the specified point as a 2×2 matrix.
-
inverse
public LinearTransform2D inverse() throws org.opengis.referencing.operation.NoninvertibleTransformExceptionCreates the inverse transform of this object. The inverse shall be linear and two-dimensional.- Specified by:
inversein interfaceLinearTransform- Specified by:
inversein interfaceLinearTransform2D- Specified by:
inversein interfaceorg.opengis.referencing.operation.MathTransform- Specified by:
inversein interfaceorg.opengis.referencing.operation.MathTransform2D- Overrides:
inversein classAbstractLinearTransform- Returns:
- the inverse transform.
- Throws:
org.opengis.referencing.operation.NoninvertibleTransformException- if the transform cannot be inverted.- See Also:
-