Package org.opengis.example.referencing
Class SimpleTransformFactory
- Object
-
- SimpleTransformFactory
-
- All Implemented Interfaces:
MathTransformFactory,Factory
public class SimpleTransformFactory extends Object implements MathTransformFactory
AMathTransformFactoryfor creatingSimpleTransforminstances. The only methods supported by this simple implementation are:getVendor()getAvailableMethods(Class), which returns an empty set.getLastMethodUsed(), which returnsnull.createAffineTransform(Matrix)
- Since:
- 3.1
-
-
Constructor Summary
Constructors Constructor Description SimpleTransformFactory()Creates a new factory.
-
Method Summary
Modifier and Type Method Description MathTransformcreateAffineTransform(Matrix matrix)Creates an affine transform from a matrix.MathTransformcreateBaseToDerived(CoordinateReferenceSystem baseCRS, ParameterValueGroup parameters, CoordinateSystem derivedCS)Creates a parameterized transform from a base CRS to a derived CS.MathTransformcreateConcatenatedTransform(MathTransform transform1, MathTransform transform2)Creates a transform by concatenating two existing transforms.MathTransformcreateFromWKT(String wkt)Creates a transform from a WKT string.MathTransformcreateParameterizedTransform(ParameterValueGroup parameters)Creates a transform from a group of parameters.MathTransformcreatePassThroughTransform(int firstAffectedCoordinate, MathTransform subTransform, int numTrailingCoordinates)Creates a transform which passes through a subset of ordinates to another transform.Set<OperationMethod>getAvailableMethods(Class<? extends SingleOperation> type)Returns a set of available methods for math transforms.ParameterValueGroupgetDefaultParameters(String method)Returns the default parameter values for a math transform using the given method.OperationMethodgetLastMethodUsed()Returns the operation method used for the latest call tocreateParameterizedTransform, ornullif not applicable.CitationgetVendor()Returns the implementor of this factory.-
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface MathTransformFactory
createFromXML
-
-
-
-
Method Detail
-
getVendor
public Citation getVendor()
Returns the implementor of this factory.
-
getAvailableMethods
public Set<OperationMethod> getAvailableMethods(Class<? extends SingleOperation> type)
Returns a set of available methods for math transforms. The default implementation returns an empty set.- Specified by:
getAvailableMethodsin interfaceMathTransformFactory
-
getLastMethodUsed
public OperationMethod getLastMethodUsed()
Returns the operation method used for the latest call tocreateParameterizedTransform, ornullif not applicable. The default implementation returnsnullin all cases.- Specified by:
getLastMethodUsedin interfaceMathTransformFactory
-
getDefaultParameters
public ParameterValueGroup getDefaultParameters(String method) throws NoSuchIdentifierException
Returns the default parameter values for a math transform using the given method. The default implementation throws an exception in all cases since parameterized transforms are not implemented by this simple factory.- Specified by:
getDefaultParametersin interfaceMathTransformFactory- Throws:
NoSuchIdentifierException
-
createBaseToDerived
public MathTransform createBaseToDerived(CoordinateReferenceSystem baseCRS, ParameterValueGroup parameters, CoordinateSystem derivedCS) throws FactoryException
Creates a parameterized transform from a base CRS to a derived CS. The default implementation throws an exception in all cases since parameterized transforms are not implemented by this simple factory.- Specified by:
createBaseToDerivedin interfaceMathTransformFactory- Throws:
FactoryException
-
createParameterizedTransform
public MathTransform createParameterizedTransform(ParameterValueGroup parameters) throws FactoryException
Creates a transform from a group of parameters. The default implementation throws an exception in all cases since parameterized transforms are not implemented by this simple factory.- Specified by:
createParameterizedTransformin interfaceMathTransformFactory- Throws:
FactoryException
-
createAffineTransform
public MathTransform createAffineTransform(Matrix matrix) throws FactoryException
Creates an affine transform from a matrix. If the transform's input dimension isM, and output dimension isN, then the matrix will have size[N+1][M+1]. The +1 in the matrix dimensions allows the matrix to do a shift, as well as a rotation. The[M][j]element of the matrix will be the j'th ordinate of the moved origin. The[i][N]element of the matrix will be 0 for i less thanM, and 1 for i equalsM.- Specified by:
createAffineTransformin interfaceMathTransformFactory- Parameters:
matrix- the matrix used to define the affine transform.- Returns:
- the affine transform.
- Throws:
FactoryException- if the object creation failed.- See Also:
AffineTransform2D,ProjectiveTransform
-
createConcatenatedTransform
public MathTransform createConcatenatedTransform(MathTransform transform1, MathTransform transform2) throws FactoryException
Creates a transform by concatenating two existing transforms. The default implementation throws an exception in all cases since concatenated transforms are not implemented by this simple factory.- Specified by:
createConcatenatedTransformin interfaceMathTransformFactory- Throws:
FactoryException
-
createPassThroughTransform
public MathTransform createPassThroughTransform(int firstAffectedCoordinate, MathTransform subTransform, int numTrailingCoordinates) throws FactoryException
Creates a transform which passes through a subset of ordinates to another transform. The default implementation throws an exception in all cases since pass through transforms are not implemented by this simple factory.- Specified by:
createPassThroughTransformin interfaceMathTransformFactory- Throws:
FactoryException
-
createFromWKT
public MathTransform createFromWKT(String wkt) throws FactoryException
Creates a transform from a WKT string. The default implementation throws an exception in all cases since WKT parsing is not implemented by this simple factory.- Specified by:
createFromWKTin interfaceMathTransformFactory- Throws:
FactoryException
-
-