public abstract class AbstractMathTransform2D extends AbstractMathTransform implements MathTransform2D
The simplest way to implement this abstract class is to provide an implementation for the following methods only:
However more performance may be gained by overriding the othertransform methods as well.
MathTransform2D are immutable and thread-safe.
It is highly recommended that third-party implementations be immutable and thread-safe too.
This means that unless otherwise noted in the javadoc, MathTransform2D instances can
be shared by many objects and passed between threads without synchronization.
MathTransform2D may or may not be serializable, at implementation choices.
Most Apache SIS implementations are serializable, but the serialized objects are not guaranteed to be compatible
with future SIS versions. Serialization should be used only for short term storage or RMI between applications
running the same SIS version.Defined in the sis-referencing module
| Modifier and Type | Class and Description |
|---|---|
protected class |
AbstractMathTransform2D.Inverse
Base class for implementation of inverse math transforms.
|
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractMathTransform2D()
Constructor for subclasses.
|
| Modifier and Type | Method and Description |
|---|---|
Shape |
createTransformedShape(Shape shape)
Transforms the specified shape.
|
Matrix |
derivative(Point2D point)
Gets the derivative of this transform at a point.
|
int |
getSourceDimensions()
Returns the dimension of input points, which is always 2.
|
int |
getTargetDimensions()
Returns the dimension of output points, which is always 2.
|
MathTransform2D |
inverse()
Returns the inverse transform of this object.
|
Point2D |
transform(Point2D ptSrc,
Point2D ptDst)
Transforms the specified
ptSrc and stores the result in ptDst. |
computeHashCode, derivative, equals, equals, formatTo, getContextualParameters, getParameterDescriptors, getParameterValues, hashCode, isIdentity, transform, transform, transform, transform, transform, transform, tryConcatenateprint, toString, toString, toWKTclone, finalize, getClass, notify, notifyAll, wait, wait, waitderivative, isIdentity, toWKT, transform, transform, transform, transform, transformprotected AbstractMathTransform2D()
public final int getSourceDimensions()
getSourceDimensions in interface MathTransformgetSourceDimensions in class AbstractMathTransformDefaultOperationMethod.getSourceDimensions()public final int getTargetDimensions()
getTargetDimensions in interface MathTransformgetTargetDimensions in class AbstractMathTransformDefaultOperationMethod.getTargetDimensions()public Point2D transform(Point2D ptSrc, Point2D ptDst) throws TransformException
ptSrc and stores the result in ptDst.
The default implementation invokes AbstractMathTransform.transform(double[], int, double[], int, boolean)
using a temporary array of doubles.transform in interface MathTransform2DptSrc - the coordinate point to be transformed.ptDst - the coordinate point that stores the result of transforming ptSrc,
or null if a new point shall be created.ptSrc and storing the result in ptDst,
or in a new point if ptDst was null.TransformException - if the point can not be transformed.MathTransform2D.transform(Point2D, Point2D)public Shape createTransformedShape(Shape shape) throws TransformException
Path2D, but may also be a Line2D or a QuadCurve2D if such
simplification is possible.createTransformedShape in interface MathTransform2Dshape - shape to transform.shape if this transform is the identity transform.TransformException - if a transform failed.public Matrix derivative(Point2D point) throws TransformException
AbstractMathTransform.transform(double[], int, double[], int, boolean) method,
with the derivate boolean argument set to true.TransformException.derivative in interface MathTransform2Dpoint - the coordinate point where to evaluate the derivative.TransformException - if the derivative can not be evaluated at the specified point.public MathTransform2D inverse() throws NoninvertibleTransformException
this if this transform is an identity transform,
or throws an exception otherwise. Subclasses should override this method.inverse in interface MathTransforminverse in interface MathTransform2Dinverse in class AbstractMathTransformNoninvertibleTransformExceptionCopyright © 2010–2017 The Apache Software Foundation. All rights reserved.