org.geotools.referencing.operation
Class DefaultOperation
Object
Formattable
AbstractIdentifiedObject
AbstractCoordinateOperation
DefaultSingleOperation
DefaultOperation
- All Implemented Interfaces:
- Serializable, IdentifiedObject, CoordinateOperation, Operation, SingleOperation
- Direct Known Subclasses:
- DefaultConversion, DefaultTransformation
public class DefaultOperation
- extends DefaultSingleOperation
- implements Operation
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:
DefaultOperationMethod
,
Serialized Form
Methods inherited from class AbstractCoordinateOperation |
getAccuracy, getAccuracy, getCoordinateOperationAccuracy, getDomainOfValidity, getMathTransform, getOperationVersion, getPositionalAccuracy, getScope, getSourceCRS, getTargetCRS, getType, getValidArea |
Methods 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, nameMatches |
method
protected final OperationMethod method
- The operation method.
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 the
AbstractCoordinateOperation
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 may constructs instance of
Conversion
or Transformation
among 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, 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:
DefaultConversion.create(org.opengis.referencing.operation.Conversion, org.opengis.referencing.crs.CoordinateReferenceSystem, org.opengis.referencing.crs.CoordinateReferenceSystem, org.opengis.referencing.operation.MathTransform, java.lang.Class extends org.opengis.referencing.operation.Conversion>)
getMethod
public OperationMethod getMethod()
- Returns the operation method.
- Specified by:
getMethod
in interface Operation
- Returns:
- The operation method.
getParameterValues
public ParameterValueGroup getParameterValues()
throws UnsupportedOperationException
- Returns the parameter values. The default implementation infer the parameter
values from the
transform
, if possible.
- Specified by:
getParameterValues
in interface Operation
- Returns:
- The parameter values.
- Throws:
UnsupportedOperationException
- if the parameters values can't be determined
for current math transform implementation.- See Also:
DefaultMathTransformFactory.createParameterizedTransform(org.opengis.parameter.ParameterValueGroup)
,
AbstractMathTransform.getParameterValues()
equals
public boolean equals(AbstractIdentifiedObject object,
boolean compareMetadata)
- Compare this operation method with the specified object for equality.
If
compareMetadata
is true
, then all available properties
are compared including formula.
- Overrides:
equals
in class AbstractCoordinateOperation
- Parameters:
object
- The object to compare to this
.compareMetadata
- true
for performing a strict comparaison, or
false
for comparing only properties relevant to transformations.
- Returns:
true
if both objects are equal.
hashCode
public int hashCode()
- Returns a hash code value for this operation method.
- Overrides:
hashCode
in class AbstractCoordinateOperation
- Returns:
- The hash code value. This value doesn't need to be the same
in past or future versions of this class.
formatWKT
protected String formatWKT(Formatter formatter)
- 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:
formatWKT
in class AbstractCoordinateOperation
- Parameters:
formatter
- The formatter to use.
- Returns:
- The WKT element name.
- See Also:
Formattable.toWKT()
,
Formattable.toString()
Copyright © 1996-2014 Geotools. All Rights Reserved.