public class DefaultTransformation extends AbstractCoordinateOperation implements Transformation
This coordinate operation contains an operation method, usually
with associated parameter values. In the SIS default implementation, the parameter values are inferred from the
math transform. Subclasses may have to override the getParameterValues()
method if they need to provide a different set of parameters.
Transformation
instances created using only SIS factories and static constants can be shared
by many objects and passed between threads without synchronization.DefaultConversion
,
Serialized FormDefined in the sis-referencing
module
DEPRECATED_KEY, LOCALE_KEY
COORDINATE_OPERATION_ACCURACY_KEY, DOMAIN_OF_VALIDITY_KEY, OPERATION_VERSION_KEY, SCOPE_KEY
ALIAS_KEY, IDENTIFIERS_KEY, NAME_KEY, REMARKS_KEY
Modifier | Constructor and Description |
---|---|
|
DefaultTransformation(Map<String,?> properties,
CoordinateReferenceSystem sourceCRS,
CoordinateReferenceSystem targetCRS,
CoordinateReferenceSystem interpolationCRS,
OperationMethod method,
MathTransform transform)
Creates a coordinate transformation from the given properties.
|
protected |
DefaultTransformation(Transformation operation)
Creates a new coordinate operation with the same values than the specified one.
|
Modifier and Type | Method and Description |
---|---|
static DefaultTransformation |
castOrCopy(Transformation object)
Returns a SIS coordinate operation implementation with the values of the given arbitrary implementation.
|
boolean |
equals(Object object,
ComparisonMode mode)
Compares this coordinate operation with the specified object for equality.
|
Class<? extends Transformation> |
getInterface()
Returns the GeoAPI interface implemented by this class.
|
OperationMethod |
getMethod()
Returns a description of the operation method, including a list of expected parameter names.
|
ParameterDescriptorGroup |
getParameterDescriptors()
Returns a description of the parameters.
|
ParameterValueGroup |
getParameterValues()
Returns the parameter values.
|
castOrCopy, computeHashCode, formatTo, getCoordinateOperationAccuracy, getDomainOfValidity, getInterpolationCRS, getLinearAccuracy, getMathTransform, getOperationVersion, getScope, getSourceCRS, getTargetCRS, isDefiningConversion
castOrCopy, equals, getAlias, getDescription, getIdentifiers, getName, getRemarks, hashCode, isDeprecated, isHeuristicMatchForName
print, toString, toString, toWKT
getOperationVersion, getSourceCRS, getTargetCRS
getMethod, getParameterValues
getCoordinateOperationAccuracy, getDomainOfValidity, getMathTransform, getScope
getAlias, getIdentifiers, getName, getRemarks, toWKT
public DefaultTransformation(Map<String,?> properties, CoordinateReferenceSystem sourceCRS, CoordinateReferenceSystem targetCRS, CoordinateReferenceSystem interpolationCRS, OperationMethod method, MathTransform transform)
Property name | Value type | Returned by |
---|---|---|
"name" | Identifier or String |
AbstractIdentifiedObject.getName() |
"identifiers" | Identifier (optionally as array) |
AbstractIdentifiedObject.getIdentifiers() |
"coordinateOperationAccuracy" | PositionalAccuracy (optionally as array) |
AbstractCoordinateOperation.getCoordinateOperationAccuracy() |
"domainOfValidity" | Extent |
AbstractCoordinateOperation.getDomainOfValidity() |
properties
- The properties to be given to the identified object.sourceCRS
- The source CRS.targetCRS
- The target CRS.interpolationCRS
- The CRS of additional coordinates needed for the operation, or null
if none.method
- The coordinate operation method (mandatory in all cases).transform
- Transform from positions in the source CRS to positions in the target CRS.protected DefaultTransformation(Transformation operation)
This constructor performs a shallow copy, i.e. the properties are not cloned.
operation
- The coordinate operation to copy.castOrCopy(Transformation)
public static DefaultTransformation castOrCopy(Transformation object)
DefaultTransformation
, then it is returned unchanged.
Otherwise a new DefaultTransformation
instance is created using the
copy constructor and returned.
Note that this is a shallow copy operation, since the other properties contained in the given
object are not recursively copied.object
- The object to get as a SIS implementation, or null
if none.null
if the argument was null.public Class<? extends Transformation> getInterface()
Transformation.class
.
Transformation
sub-interface. Overriding possibility is left mostly for implementors who wish to extend GeoAPI with their
own set of interfaces.getInterface
in class AbstractCoordinateOperation
Transformation.class
or a user-defined sub-interface.public OperationMethod getMethod()
getMethod
in interface SingleOperation
public ParameterDescriptorGroup getParameterDescriptors()
MathTransform
or from the OperationMethod
)
should be very similar. If they differ, it should be only in minor details like remarks, default
values or units of measurement.getParameterDescriptors
in interface Parameterized
DefaultOperationMethod.getParameters()
,
AbstractMathTransform.getParameterDescriptors()
public ParameterValueGroup getParameterValues()
UnsupportedImplementationException
.getParameterValues
in interface Parameterized
getParameterValues
in interface SingleOperation
UnsupportedOperationException
- if the parameter values can not be determined
for the current math transform implementation.AbstractMathTransform.getParameterValues()
public boolean equals(Object object, ComparisonMode mode)
mode
argument
is ComparisonMode.STRICT
or BY_CONTRACT
, then all available
properties are compared including the domain of validity and the
scope.equals
in interface LenientComparable
equals
in class AbstractCoordinateOperation
object
- The object to compare to this
.mode
- STRICT
for performing a strict comparison, or
IGNORE_METADATA
for ignoring properties
that do not make a difference in the numerical results of coordinate operations.true
if both objects are equal for the given comparison mode.AbstractIdentifiedObject.computeHashCode()
,
Utilities.deepEquals(Object, Object, ComparisonMode)
Copyright © 2010–2015 The Apache Software Foundation. All rights reserved.