public class DefaultOperationMethod extends AbstractIdentifiedObject implements OperationMethod
OperationMethod
contains an arbitrary amount of parameter descriptors.
Values for those parameters will be assigned by coordinate operations.
DefaultOperationMethod(MathTransform)
constructor can not infer them.DefaultSingleOperation
,
Serialized FormDefined in the sis-referencing
module
LOCALE_KEY
FORMULA_KEY
ALIAS_KEY, IDENTIFIERS_KEY, NAME_KEY, REMARKS_KEY
Modifier | Constructor and Description |
---|---|
|
DefaultOperationMethod(Map<String,?> properties,
Integer sourceDimension,
Integer targetDimension,
ParameterDescriptorGroup parameters)
Constructs an operation method from a set of properties and a descriptor group.
|
|
DefaultOperationMethod(MathTransform transform)
Convenience constructor that creates an operation method from a math transform.
|
protected |
DefaultOperationMethod(OperationMethod method)
Creates a new operation method with the same values than the specified one.
|
Modifier and Type | Method and Description |
---|---|
static DefaultOperationMethod |
castOrCopy(OperationMethod object)
Returns a SIS operation method implementation with the same values than the given arbitrary implementation.
|
protected long |
computeHashCode()
Invoked by
hashCode() for computing the hash code when first needed. |
boolean |
equals(Object object,
ComparisonMode mode)
Compares this operation method with the specified object for equality.
|
protected String |
formatTo(Formatter formatter)
Formats this operation as a Well Known Text
Method[…] element. |
Formula |
getFormula()
Formula(s) or procedure used by this operation method.
|
Class<? extends OperationMethod> |
getInterface()
Returns the GeoAPI interface implemented by this class.
|
Class<? extends CoordinateOperation> |
getOperationType()
Returns the base interface of the
CoordinateOperation instances that use this method. |
ParameterDescriptorGroup |
getParameters()
Returns the set of parameters.
|
Integer |
getSourceDimensions()
Number of dimensions in the source CRS of this operation method.
|
Integer |
getTargetDimensions()
Number of dimensions in the target CRS of this operation method.
|
static OperationMethod |
redimension(OperationMethod method,
Integer sourceDimension,
Integer targetDimension)
Returns an operation method with the same values than the specified one except the dimensions.
|
castOrCopy, equals, getAlias, getIdentifiers, getName, getRemarks, hashCode, isDeprecated, isHeuristicMatchForName
print, toString, toString, toWKT
getAlias, getIdentifiers, getName, getRemarks, toWKT
public DefaultOperationMethod(Map<String,?> properties, Integer sourceDimension, Integer targetDimension, ParameterDescriptorGroup parameters)
Property name | Value type | Returned by |
---|---|---|
"formula" | Formula , Citation or CharSequence |
getFormula() |
Defined in parent classes (reminder) | ||
"name" | Identifier or String |
AbstractIdentifiedObject.getName() |
"alias" | GenericName or CharSequence (optionally as array) |
AbstractIdentifiedObject.getAlias() |
"identifiers" | Identifier (optionally as array) |
AbstractIdentifiedObject.getIdentifiers() |
"remarks" | InternationalString or String |
AbstractIdentifiedObject.getRemarks() |
null
if this method can work
with any number of dimensions (e.g. Affine Transform).properties
- Set of properties. Shall contain at least "name"
.sourceDimension
- Number of dimensions in the source CRS of this operation method, or null
.targetDimension
- Number of dimensions in the target CRS of this operation method, or null
.parameters
- Description of parameters expected by this operation.public DefaultOperationMethod(MathTransform transform)
transform
- The math transform to describe.protected DefaultOperationMethod(OperationMethod method)
This constructor performs a shallow copy, i.e. the properties are not cloned.
method
- The operation method to copy.castOrCopy(OperationMethod)
public static DefaultOperationMethod castOrCopy(OperationMethod object)
null
, then this method returns null
.
Otherwise if the given object is already a SIS implementation, then the given object is returned unchanged.
Otherwise a new SIS implementation is created and initialized to the attribute values of the given object.object
- The object to get as a SIS implementation, or null
if none.null
if the argument was null.public static OperationMethod redimension(OperationMethod method, Integer sourceDimension, Integer targetDimension)
null
if this method can work with any number of dimensions
(e.g. Affine Transform).method
- The operation method to redimension, or null
.sourceDimension
- Number of dimensions in the source CRS of this operation method.targetDimension
- Number of dimensions in the target CRS of this operation method.method
if the given method was null
or already had th given dimensions.public Class<? extends OperationMethod> getInterface()
OperationMethod.class
.
OperationMethod
sub-interface. Overriding possibility is left mostly for implementors who wish to extend GeoAPI with their
own set of interfaces.getInterface
in class AbstractIdentifiedObject
OperationMethod.class
or a user-defined sub-interface.public Class<? extends CoordinateOperation> getOperationType()
CoordinateOperation
instances that use this method.
The base CoordinateOperation
interface is usually one of the following subtypes:
Transformation
if the coordinate operation has some errors (typically of a few metres) because of the empirical process by
which the operation parameters were determined. Those errors do not depend on the floating point precision
or the accuracy of the implementation algorithm.Conversion
if the coordinate operation is theoretically of infinite precision, ignoring the limitations of floating
point arithmetic (including rounding errors) and the approximations implied by finite series expansions.Projection
if the coordinate operation is a conversion (as defined above) converting geodetic latitudes and longitudes
to plane (map) coordinates. This type can optionally be refined with one of the
CylindricalProjection
,
ConicProjection
or
PlanarProjection
subtypes.CoordinateOperation.class
,
which is the most conservative return value.public Formula getFormula()
getFormula
in interface OperationMethod
null
if unknown.public Integer getSourceDimensions()
getSourceDimensions
in interface OperationMethod
null
if unknown.public Integer getTargetDimensions()
getTargetDimensions
in interface OperationMethod
null
if unknown.public ParameterDescriptorGroup getParameters()
getParameters
in interface OperationMethod
null
if unknown.public boolean equals(Object object, ComparisonMode mode)
mode
argument value is STRICT
or
BY_CONTRACT
, then all available properties
are compared including the formula.equals
in interface LenientComparable
equals
in class AbstractIdentifiedObject
object
- The object to compare to this
.mode
- STRICT
for performing a strict comparison, or
IGNORE_METADATA
for comparing only properties
relevant to transformations.true
if both objects are equal.AbstractIdentifiedObject.computeHashCode()
,
Utilities.deepEquals(Object, Object, ComparisonMode)
protected long computeHashCode()
hashCode()
for computing the hash code when first needed.
See AbstractIdentifiedObject.computeHashCode()
for more information.computeHashCode
in class AbstractIdentifiedObject
protected String formatTo(Formatter formatter)
Method[…]
element.formatTo
in class AbstractIdentifiedObject
formatter
- The formatter where to format the inner content of this WKT element."Method"
(WKT 2) or "Projection"
(WKT 1).FormattableObject.toWKT()
,
FormattableObject.toString()
Copyright © 2010–2015 The Apache Software Foundation. All rights reserved.