org.geotoolkit.referencing.operation
Class DefaultSingleOperation
Object
FormattableObject
AbstractIdentifiedObject
AbstractCoordinateOperation
DefaultSingleOperation
- All Implemented Interfaces:
- Serializable, Formattable, LenientComparable, IdentifiedObject, CoordinateOperation, SingleOperation
- Direct Known Subclasses:
- DefaultConversion, DefaultPassThroughOperation, DefaultTransformation
@Immutable
public class DefaultSingleOperation
- extends AbstractCoordinateOperation
- implements SingleOperation
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 Geotk implementation, the parameter values
are inferred from the transform. Other implementations may
have to override the getParameterValues() method.
This is a single (not concatenated)
coordinate operation.
- Since:
- 2.0
- Version:
- 3.18
- Author:
- Martin Desruisseaux (IRD, Geomatys)
- See Also:
- Serialized Form
- Module:
| Methods inherited from class AbstractCoordinateOperation |
computeHashCode, getAccuracy, getAccuracy, getCoordinateOperationAccuracy, getDomainOfValidity, getMathTransform, getOperationVersion, getScope, getSourceCRS, getTargetCRS, getType |
| Methods inherited from class AbstractIdentifiedObject |
equals, equals, equals, equals, getAlias, getIdentifier, getIdentifier, getIdentifiers, getName, getName, getName, getProperties, getProperties, getRemarks, hashCode, nameMatches, nameMatches, nameMatches |
method
protected final OperationMethod method
- The operation method.
DefaultSingleOperation
public DefaultSingleOperation(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 the
super-class constructor.
- 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.
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 constructs an instance
of
Transformation, ConicProjection, CylindricalProjection,
PlanarProjection, Projection or Conversion.
- 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, or null.type - The minimal type as Conversion.class,
Projection.class, etc.
This method may create an instance of a subclass of type.
- Returns:
- A new coordinate operation of the given type.
- See Also:
create(Map, CoordinateReferenceSystem, CoordinateReferenceSystem, MathTransform, OperationMethod, Class)
getMethod
public OperationMethod getMethod()
- Returns the operation method.
- Specified by:
getMethod in interface SingleOperation
getParameterValues
public ParameterValueGroup getParameterValues()
throws UnsupportedOperationException
- Returns the parameter values. The default implementation infers the parameter
values from the transform, if possible.
- Specified by:
getParameterValues in interface SingleOperation
- Throws:
UnsupportedOperationException - if the parameters values can't be determined
for the current math transform implementation.- See Also:
DefaultMathTransformFactory.createParameterizedTransform(ParameterValueGroup),
Parameterized.getParameterValues()
equals
public boolean equals(Object object,
ComparisonMode mode)
- Compares this operation method with the specified object for equality.
If the
mode argument value is STRICT or
BY_CONTRACT, then all available properties
are compared including the formula.
- Specified by:
equals in interface LenientComparable- Overrides:
equals in class AbstractCoordinateOperation
- Parameters:
object - The object to compare to this.mode - STRICT for performing a strict comparison, or
IGNORE_METADATA for comparing only properties
relevant to transformations.
- Returns:
true if both objects are equal.
formatWKT
public String formatWKT(Formatter formatter)
- Formats 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.
- Specified by:
formatWKT in interface Formattable- Overrides:
formatWKT in class AbstractCoordinateOperation
- Parameters:
formatter - The formatter to use.
- Returns:
- The WKT element name.
- See Also:
FormattableObject.toWKT(),
FormattableObject.toString()
Copyright © 2009-2011 Geotoolkit.org. All Rights Reserved.