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 long
For cross-version compatibility.Fields inherited from class org.apache.sis.referencing.operation.transform.AbstractLinearTransform
inverse
Fields inherited from class org.apache.sis.referencing.operation.transform.AbstractMathTransform
MAXIMUM_BUFFER_SIZE, MAXIMUM_FAILURES
Fields 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.Matrix
derivative
(Point2D point) Gets the derivative of this transform at a point.inverse()
Creates the inverse transform of this object.Transforms the specifiedptSrc
and 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, transform
Methods inherited from class org.apache.sis.referencing.operation.transform.AbstractLinearTransform
clone, createInverse, deltaTransform, equals, getMatrix, getParameterDescriptors, getParameterValues, isAffine, setElement, toString, tryConcatenate
Methods inherited from class org.apache.sis.referencing.operation.transform.AbstractMathTransform
beforeFormat, equals, formatTo, getContextualParameters, getDomain, hashCode, isInverseEquals, mismatchedDimension, transform
Methods inherited from class org.apache.sis.io.wkt.FormattableObject
print, toString, toWKT
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.sis.referencing.operation.transform.LinearTransform
deltaTransform, getMatrix, isAffine
Methods inherited from interface org.opengis.referencing.operation.MathTransform
derivative, getSourceDimensions, getTargetDimensions, isIdentity, toWKT, transform, transform, transform, transform, transform
Methods 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 specifiedptSrc
and stores the result inptDst
. Implementation is similar but not identical toAbstractMathTransform2D.transform(Point2D, Point2D)
. The difference is in thetransform(…)
method invoked.- Specified by:
transform
in interfaceorg.opengis.referencing.operation.MathTransform2D
-
createTransformedShape
public Shape createTransformedShape(Shape shape) throws org.opengis.referencing.operation.TransformException Transforms the specified shape.- Specified by:
createTransformedShape
in interfaceorg.opengis.referencing.operation.MathTransform2D
- Throws:
org.opengis.referencing.operation.TransformException
-
derivative
Gets the derivative of this transform at a point.- Specified by:
derivative
in 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:
inverse
in interfaceLinearTransform
- Specified by:
inverse
in interfaceLinearTransform2D
- Specified by:
inverse
in interfaceorg.opengis.referencing.operation.MathTransform
- Specified by:
inverse
in interfaceorg.opengis.referencing.operation.MathTransform2D
- Overrides:
inverse
in classAbstractLinearTransform
- Returns:
- the inverse transform.
- Throws:
org.opengis.referencing.operation.NoninvertibleTransformException
- if the transform cannot be inverted.- See Also:
-