Class DefaultOperation
- All Implemented Interfaces:
Serializable,IdentifiedObject,CoordinateOperation,Operation,SingleOperation
- Direct Known Subclasses:
DefaultConversion,DefaultTransformation
A parameterized mathematical operation on coordinates that transforms or converts coordinates to another coordinate
reference system. This coordinate operation thus uses an operation method, usually with associated parameter values.
In the Geotools implementation, the parameter values are inferred from the
transform. Other implementations may have to overrides the getParameterValues()
method.
- Since:
- 2.1
- Author:
- Martin Desruisseaux (IRD)
- See Also:
-
Field Summary
FieldsFields inherited from class AbstractCoordinateOperation
domainOfValidity, EMPTY_ACCURACY_ARRAY, sourceCRS, targetCRS, transformFields inherited from class AbstractIdentifiedObject
EMPTY_ALIAS_ARRAY, EMPTY_IDENTIFIER_ARRAY, IDENTIFIER_COMPARATOR, NAME_COMPARATOR, REMARKS_COMPARATORFields inherited from class Formattable
SINGLE_LINEFields 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
ConstructorsConstructorDescriptionDefaultOperation(Map<String, ?> properties, CoordinateReferenceSystem sourceCRS, CoordinateReferenceSystem targetCRS, MathTransform transform, OperationMethod method) Constructs an operation from a set of properties. -
Method Summary
Modifier and TypeMethodDescriptionstatic CoordinateOperationcreate(Map<String, ?> properties, CoordinateReferenceSystem sourceCRS, CoordinateReferenceSystem targetCRS, MathTransform transform, OperationMethod method, Class<? extends CoordinateOperation> type) Returns a coordinate operation of the specified class.booleanequals(AbstractIdentifiedObject object, boolean compareMetadata) Compare this operation method with the specified object for equality.protected StringFormat this operation as a pseudo-WKT format.Returns the operation method.Returns the parameter values.inthashCode()Returns a hash code value for this operation method.Methods inherited from class AbstractCoordinateOperation
getAccuracy, getAccuracy, getCoordinateOperationAccuracy, getDomainOfValidity, getMathTransform, getOperationVersion, getScope, getSourceCRS, getTargetCRS, getTypeMethods inherited from class AbstractIdentifiedObject
asSet, ensureAngularUnit, ensureLinearUnit, ensureNonNull, ensureNonNull, ensureTimeUnit, equals, equals, equals, equals, getAlias, getIdentifier, getIdentifier, getIdentifiers, getName, getName, getName, getProperties, getProperties, getRemarks, nameMatches, nameMatches, nameMatchesMethods inherited from class Formattable
cleanupThreadLocals, toString, toWKT, toWKT, toWKT, toWKTMethods inherited from interface CoordinateOperation
getCoordinateOperationAccuracy, getDomainOfValidity, getMathTransform, getOperationVersion, getScope, getSourceCRS, getTargetCRSMethods inherited from interface IdentifiedObject
getAlias, getIdentifiers, getName, getRemarks, toWKT
-
Field Details
-
method
The operation method.
-
-
Constructor Details
-
DefaultOperation
public DefaultOperation(Map<String, ?> properties, CoordinateReferenceSystem sourceCRS, CoordinateReferenceSystem targetCRS, MathTransform transform, OperationMethod method) Constructs an operation from a set of properties. The properties given in argument follow the same rules than for theAbstractCoordinateOperationconstructor.- Parameters:
properties- Set of properties. Should contains at least"name".sourceCRS- The source CRS.targetCRS- The target CRS.transform- Transform from positions in the source CRS to positions in the target CRS.method- The operation method.
-
-
Method Details
-
create
public static CoordinateOperation create(Map<String, ?> properties, CoordinateReferenceSystem sourceCRS, CoordinateReferenceSystem targetCRS, MathTransform transform, OperationMethod method, Class<? extends CoordinateOperation> type) Returns a coordinate operation of the specified class. This method may constructs instance ofConversionorTransformationamong others.- Parameters:
properties- Set of properties. Should contains at least"name".sourceCRS- The source CRS.targetCRS- The target CRS.transform- Transform from positions in the source CRS to positions in the target CRS.method- The operation method, ornull.type- The minimal type asConversion.class,Projection.class, etc. This method may create an instance of a subclass oftype.- Returns:
- A new coordinate operation of the given type.
- See Also:
-
getMethod
Returns the operation method. -
getParameterValues
Returns the parameter values. The default implementation infer the parameter values from thetransform, if possible.- Specified by:
getParameterValuesin interfaceOperation- Returns:
- The parameter values.
- Throws:
UnsupportedOperationException- if the parameters values can't be determined for current math transform implementation.- See Also:
-
equals
Compare this operation method with the specified object for equality. IfcompareMetadataistrue, then all available properties are compared including formula.- Overrides:
equalsin classAbstractCoordinateOperation- Parameters:
object- The object to compare tothis.compareMetadata-truefor performing a strict comparaison, orfalsefor comparing only properties relevant to transformations.- Returns:
trueif both objects are equal.
-
hashCode
public int hashCode()Returns a hash code value for this operation method.- Overrides:
hashCodein classAbstractCoordinateOperation- Returns:
- The hash code value. This value doesn't need to be the same in past or future versions of this class.
-
formatWKT
Format this operation as a pseudo-WKT format. No WKT format were defined for coordinate operation at the time this method was written. This method may change in any future version until a standard format is found.- Overrides:
formatWKTin classAbstractCoordinateOperation- Parameters:
formatter- The formatter to use.- Returns:
- The WKT element name.
- See Also:
-