Class DefiningConversion
- All Implemented Interfaces:
Serializable, Formattable, Parameterized, Deprecable, LenientComparable, Printable, IdentifiedObject, Conversion, CoordinateOperation, SingleOperation
specialize(…) method can be invoked
for creating a math transform from the parameters
and assign the source and target CRS to the final conversion.- Since:
- 1.7
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe preprocessing and post-processing steps to apply before and after a defining conversion. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringKey for a property specifying the preprocessing and post-processing steps to apply before and after the defining conversion.Fields inherited from class AbstractIdentifiedObject
DEPRECATED_KEY, DOMAINS_KEY, LOCALE_KEYModifier and TypeFieldDescriptionstatic final StringOptional key which can be given to the constructor for specifying the object is deprecated.static final StringKey for the"domains"property to be given to theObjectFactory.createFoo(Map, ...)methods.static final StringOptional key which can be given to the constructor for specifying the locale to use for producing error messages.Fields inherited from interface CoordinateOperation
COORDINATE_OPERATION_ACCURACY_KEY, DOMAIN_OF_VALIDITY_KEY, OPERATION_VERSION_KEY, SCOPE_KEYFields inherited from interface IdentifiedObject
ALIAS_KEY, IDENTIFIERS_KEY, NAME_KEY, REMARKS_KEY -
Constructor Summary
ConstructorsConstructorDescriptionDefiningConversion(Map<String, ?> properties, OperationMethod method, MathTransform transform, ParameterValueGroup parameters) Creates a defining conversion from the given transform and/or parameters. -
Method Summary
Modifier and TypeMethodDescriptionbooleanequals(Object object, ComparisonMode mode) Compares this coordinate operation with the specified object for equality.Returns a description of the operation method, including a list of expected parameter names.Returns a description of the parameters.Returns the parameter values.Returns the preprocessing and post-processing steps to apply before and after the defining conversion.specialize(CoordinateReferenceSystem sourceCRS, CoordinateReferenceSystem targetCRS, MathTransformFactory factory) Returns a specialization of this conversion with non-null CRSs.Methods inherited from class DefaultConversion
castOrCopy, getStandardTypeModifier and TypeMethodDescriptionstatic DefaultConversioncastOrCopy(Conversion object) Returns a SIS coordinate operation implementation with the values of the given arbitrary implementation.Returns the GeoAPI interface that defines the contract of this implementation class.Methods inherited from class AbstractCoordinateOperation
castOrCopy, formatTo, getCoordinateOperationAccuracy, getDomainOfValidity, getInterpolationCRS, getLinearAccuracy, getMathTransform, getOperationVersion, getScope, getSourceCRS, getSourceEpoch, getTargetCRS, getTargetEpoch, getWrapAroundChanges, isDefiningConversion, transformModifier and TypeMethodDescriptioncastOrCopy(CoordinateOperation object) Returns a SIS coordinate operation implementation with the values of the given arbitrary implementation.protected StringFormats this coordinate operation in Well Known Text (WKT) version 2 format.Returns an estimation of the impact of this operation on point accuracy.Deprecated.Returns the CRS to be used for interpolations in a grid.doubleReturns an estimation of positional accuracy in metres, orNaNif unknown.Returns the object for transforming coordinates in the source CRS to coordinates in the target CRS.Returns the version of the coordinate operation.Deprecated.Replaced byAbstractIdentifiedObject.getDomains()as of ISO 19111:2019.Returns the source CRS, ornullif unspecified.Returns the date at which source coordinate tuples are valid.Returns the target CRS, ornullif unspecified.Returns the date at which target coordinate tuples are valid.Returns the indices of target dimensions where "wrap around" may happen as a result of this coordinate operation.booleanDeprecated, for removal: This API element is subject to removal in a future version.Replaced by theDefiningConversionclass.Changes coordinates from being referenced to the source CRS and/or epoch to being referenced to the target CRS and/or epoch.Methods inherited from class AbstractIdentifiedObject
castOrCopy, equals, formatTo, getAlias, getDescription, getDomains, getIdentifiers, getInterface, getName, getRemarks, hashCode, isDeprecated, isHeuristicMatchForNameModifier and TypeMethodDescriptionstatic AbstractIdentifiedObjectcastOrCopy(IdentifiedObject object) Returns a SIS identified object implementation with the values of the given arbitrary implementation.final booleanCompares the specified object with this object for equality.voidFormats the name or identifier of this object using the provider formatter.Returns alternative names by which this object is identified.Returns a narrative explanation of the role of this object.Returns the usage of this CRS-related object.Returns identifiers which references elsewhere the object's defining information.final Class<? extends IdentifiedObject> Deprecated, for removal: This API element is subject to removal in a future version.RenamedAbstractIdentifiedObject.getStandardType()for integration withLenientComparable.getName()Returns the primary name by which this object is identified.Returns comments on or information about this object, including data source information.final intReturns a hash value for this identified object.booleanReturnstrueif this object is deprecated.booleanReturnstrueif either the primary name or at least one alias matches the given string according heuristic rules.Methods inherited from class FormattableObject
print, toString, toString, toWKTModifier and TypeMethodDescriptionvoidprint()Prints a string representation of this object to the standard output stream.Returns a Well Known Text (WKT) or an alternative text representation for this object.toString(Convention convention) Returns a Well Known Text (WKT) for this object using the specified convention.toWKT()Returns a strictly compliant Well Known Text (WKT) using the default convention, symbols and indentation.Methods inherited from class Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface Conversion
getOperationVersion, getSourceCRS, getTargetCRSModifier and TypeMethodDescriptionThis attribute is declared inCoordinateOperationbut is not used in a conversion.Returns the source CRS.Returns the target CRS.Methods inherited from interface IdentifiedObject
toWKT
-
Field Details
-
SIDE_PROCESSING_KEY
Key for a property specifying the preprocessing and post-processing steps to apply before and after the defining conversion. The associated value shall be an instance ofDefiningConversion.SideProcessing. Possible values are:DefiningConversion.SideProcessing.NORMALIZEDmeans that the conversion is defined between a pair of CRSs normalized in the sense ofAxesConvention.NORMALIZED: the source and target coordinate systems are right-handed and use predetermined units of measurement such as degrees and metres. TheDefiningConversionneeds to be completed with unit conversions and axis order changes. These changes can be applied byDefaultConversion.specialize(…).DefiningConversion.SideProcessing.NONEmeans that no preprocessing or post-processing steps shall be added.
DefiningConversion.SideProcessing.NORMALIZED.- See Also:
-
-
Constructor Details
-
DefiningConversion
public DefiningConversion(Map<String, ?> properties, OperationMethod method, MathTransform transform, ParameterValueGroup parameters) Creates a defining conversion from the given transform and/or parameters. This conversion has no source and target CRS since those elements are usually unknown at defining conversion construction time. The source and target CRS will become known later, at the derived CRS construction time.The
propertiesmap given in argument follows the same rules as for the parent constructor, with the addition of the following properties:Additional properties Property name Value type Returned by "sideProcessing" DefiningConversion.SideProcessinggetSideProcessing()Transform and parameters arguments
At least one of thetransformorparametersargument must be non-null. If the caller supplies atransformargument, then by default it shall be a transform expecting normalized input coordinates and producing normalized output coordinates (seeAxesConventionfor more information about what Apache SIS means by "normalized"). This default behavior can be disabled by setting the "sideProcessing" key toNONE.If the caller cannot yet supply a
MathTransform, then it shall supply the parameter values needed for creating that transform, with the possible omission of"semi_major"and"semi_minor"values. The semi-major and semi-minor parameter values will be set automatically when thespecialize(…)method will be invoked.If both the
transformandparametersarguments are non-null, then the latter should describe the parameters used for creating the transform. Those parameters will be stored for information purpose and can be given back by theSingleOperation.getParameterValues()method.- Parameters:
properties- the properties to be given to the identified object.method- the operation method.transform- transform from positions in the source CRS to positions in the target CRS, ornull.parameters- thetransformparameter values, ornull.
-
-
Method Details
-
getSideProcessing
Returns the preprocessing and post-processing steps to apply before and after the defining conversion. IfNORMALIZED, the source and target coordinate systems are right-handed and use predetermined units of measurement such as degrees and metres. Such conversion needs to be completed by a call tospecialize(…).If this method returns
NONE, then thisDefiningConversiondefines fully the conversion and no conversion step should be added.- Returns:
- the preprocessing and post-processing steps to apply before and after the defining conversion.
- See Also:
-
specialize
public Conversion specialize(CoordinateReferenceSystem sourceCRS, CoordinateReferenceSystem targetCRS, MathTransformFactory factory) throws FactoryException Returns a specialization of this conversion with non-null CRSs. This method should be invoked when more information become available about the conversion to create.- Overrides:
specializein classDefaultConversion- Parameters:
sourceCRS- the source CRS.targetCRS- the target CRS.factory- the factory to use for creating a transform from the parameters or for performing axis changes, ornullfor the default factory.- Returns:
- conversion which declares the given CRSs as the source and target.
- Throws:
FactoryException- if the creation of aMathTransformfrom the parameter values failed.
-
getMethod
Returns a description of the operation method, including a list of expected parameter names. The returned object does not contains any parameter value.- Specified by:
getMethodin interfaceSingleOperation- Returns:
- a description of the operation method.
-
getParameterDescriptors
Returns a description of the parameters. The default implementation performs the following choice:- If parameter values were specified explicitly at construction time, then the descriptor of those parameters is returned.
- Otherwise if this method can infer the parameter descriptor from the math transform, then that descriptor is returned.
- Otherwise fallback on the method parameters.
Note: the two parameter descriptions (from theMathTransformor from theOperationMethod) should be very similar. If they differ, it should be only in minor details like remarks, default values or units of measurement.- Specified by:
getParameterDescriptorsin interfaceParameterized- Returns:
- a description of the parameters.
- See Also:
-
getParameterValues
Returns the parameter values. The default implementation performs the following choice:- If parameter values were specified explicitly at construction time, then they are returned as an unmodifiable parameter group.
- Otherwise if this method can infer the parameter values from the math transform, then those parameters are returned.
- Otherwise throw
UnsupportedImplementationException.
- Specified by:
getParameterValuesin interfaceParameterized- Specified by:
getParameterValuesin interfaceSingleOperation- Returns:
- the parameter values.
- Throws:
UnsupportedOperationException- if the parameter values cannot be determined for the current math transform implementation.- See Also:
-
equals
Compares this coordinate operation with the specified object for equality. If themodeargument isComparisonMode.STRICTorBY_CONTRACT, then all available properties are compared including the domains and the accuracy.- Specified by:
equalsin interfaceLenientComparable- Overrides:
equalsin classAbstractCoordinateOperation- Parameters:
object- the object to compare tothis.mode- the strictness level of the comparison.- Returns:
trueif both objects are equal for the given comparison mode.- See Also:
-
AbstractIdentifiedObject.getDomains()as of ISO 19111:2019.