Class Affine
java.lang.Object
org.apache.sis.io.wkt.FormattableObject
org.apache.sis.referencing.AbstractIdentifiedObject
org.apache.sis.referencing.operation.DefaultOperationMethod
org.apache.sis.internal.referencing.provider.AbstractProvider
org.apache.sis.internal.referencing.provider.Affine
- All Implemented Interfaces:
Serializable,Formattable,MathTransformProvider,Deprecable,LenientComparable,org.opengis.referencing.IdentifiedObject,org.opengis.referencing.operation.OperationMethod
The provider for "Affine parametric transformation" (EPSG:9624).
The set of available parameters depends on the matrix size, which is 3×3 by default.
| EPSG code | EPSG name | OGC name | Default value |
|---|---|---|---|
num_row | 3 | ||
num_col | 3 | ||
| 8623 | A0 | elt_0_0 | 1 |
| 8624 | A1 | elt_0_1 | 0 |
| 8625 | A2 | elt_0_2 | 0 |
| 8639 | B0 | elt_1_0 | 0 |
| 8640 | B1 | elt_1_1 | 1 |
| 8641 | B2 | elt_1_2 | 0 |
elt_2_0 | 0 | ||
elt_2_1 | 0 | ||
elt_2_2 | 1 |
- Since:
- 0.5
- Version:
- 1.1
- Author:
- Martin Desruisseaux (IRD, Geomatys)
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe number of dimensions used by the EPSG:9624 definition.static final StringThe operation method name as defined in the EPSG database.Fields inherited from class org.apache.sis.internal.referencing.provider.AbstractProvider
sourceCSType, sourceOnEllipsoid, targetCSType, targetOnEllipsoidFields inherited from class org.apache.sis.referencing.AbstractIdentifiedObject
DEPRECATED_KEY, LOCALE_KEYFields inherited from interface org.opengis.referencing.IdentifiedObject
ALIAS_KEY, IDENTIFIERS_KEY, NAME_KEY, REMARKS_KEYFields inherited from interface org.opengis.referencing.operation.OperationMethod
FORMULA_KEY -
Constructor Summary
ConstructorsConstructorDescriptionAffine()Creates a provider for affine transform with a default matrix size (standard EPSG:9624 instance). -
Method Summary
Modifier and TypeMethodDescriptionorg.opengis.referencing.operation.MathTransformcreateMathTransform(org.opengis.referencing.operation.MathTransformFactory factory, org.opengis.parameter.ParameterValueGroup values) Creates a projective transform from the specified group of parameter values.static AffinegetProvider(int sourceDimensions, int targetDimensions, boolean isAffine) Returns the operation method for the specified source and target dimensions.static org.opengis.parameter.ParameterValueGroupidentity(int dimension) Returns parameter values for an identity transform of the given input and output dimensions.inverse()The inverse of this operation can be described by the same operation with different parameter values.static org.opengis.parameter.ParameterValueGroupparameters(org.opengis.referencing.operation.Matrix matrix) Returns the parameter values for the given matrix.org.opengis.referencing.operation.OperationMethodredimension(int sourceDimensions, int targetDimensions) Deprecated.ISO 19111:2019 removed source/target dimensions attributes.Methods inherited from class org.apache.sis.internal.referencing.provider.AbstractProvider
getOperationType, resolveAmbiguityMethods inherited from class org.apache.sis.referencing.operation.DefaultOperationMethod
castOrCopy, computeHashCode, equals, formatTo, getFormula, getInterface, getParameters, getSourceDimensions, getTargetDimensions, redimensionMethods inherited from class org.apache.sis.referencing.AbstractIdentifiedObject
castOrCopy, equals, formatTo, getAlias, getDescription, getIdentifiers, getName, getRemarks, hashCode, isDeprecated, isHeuristicMatchForNameMethods inherited from class org.apache.sis.io.wkt.FormattableObject
print, toString, toString, toWKTMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.opengis.referencing.IdentifiedObject
getAlias, getIdentifiers, getName, getRemarks, toWKT
-
Field Details
-
NAME
The operation method name as defined in the EPSG database. Must matches exactly the EPSG name (this will be verified by JUnit tests).Note: in contrast, the name used by OGC is just "Affine".
- See Also:
-
EPSG_DIMENSION
public static final int EPSG_DIMENSIONThe number of dimensions used by the EPSG:9624 definition. This will be used as the default number of dimensions. Operation methods of other dimensions, where we have no EPSG definition, shall use the Well Known Text (WKT) parameter names.- See Also:
-
-
Constructor Details
-
Affine
public Affine()Creates a provider for affine transform with a default matrix size (standard EPSG:9624 instance). This constructor is public for the needs ofServiceLoader— do not invoke explicitly. If an instance ofAffine()is desired, invokegetProvider(EPSG_DIMENSION, EPSG_DIMENSION)instead.- See Also:
-
-
Method Details
-
inverse
The inverse of this operation can be described by the same operation with different parameter values.- Overrides:
inversein classAbstractProvider- Returns:
thisfor allAffine.- See Also:
-
createMathTransform
public org.opengis.referencing.operation.MathTransform createMathTransform(org.opengis.referencing.operation.MathTransformFactory factory, org.opengis.parameter.ParameterValueGroup values) throws org.opengis.parameter.ParameterNotFoundException Creates a projective transform from the specified group of parameter values.- Parameters:
factory- ignored (can be null).values- the group of parameter values.- Returns:
- the created math transform.
- Throws:
org.opengis.parameter.ParameterNotFoundException- if a required parameter was not found.
-
redimension
@Deprecated public org.opengis.referencing.operation.OperationMethod redimension(int sourceDimensions, int targetDimensions) Deprecated.ISO 19111:2019 removed source/target dimensions attributes.Returns the same operation method, but for different dimensions.- Overrides:
redimensionin classDefaultOperationMethod- Parameters:
sourceDimensions- the desired number of input dimensions.targetDimensions- the desired number of output dimensions.- Returns:
- the redimensioned operation method, or
thisif no change is needed.
-
getProvider
Returns the operation method for the specified source and target dimensions. This method provides differentAffineinstances for different dimensions.- Parameters:
sourceDimensions- the number of source dimensions.targetDimensions- the number of target dimensions.isAffine-trueif the transform is affine.- Returns:
- the provider for transforms of the given source and target dimensions.
-
identity
public static org.opengis.parameter.ParameterValueGroup identity(int dimension) Returns parameter values for an identity transform of the given input and output dimensions. Callers can modify the returned parameters if desired.- Parameters:
dimension- the number of source and target dimensions.- Returns:
- parameters for an identity transform of the given dimensions.
- Since:
- 0.8
-
parameters
public static org.opengis.parameter.ParameterValueGroup parameters(org.opengis.referencing.operation.Matrix matrix) Returns the parameter values for the given matrix. This method is invoked by implementations ofAbstractMathTransform.getParameterValues().- Parameters:
matrix- the matrix for which to get parameter values.- Returns:
- the parameters of the given matrix.
-