|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectFormattableObject
AbstractIdentifiedObject
DefaultOperationMethod
@Immutable public class DefaultOperationMethod
Definition of an algorithm used to perform a coordinate operation. Most operation methods use a number of operation parameters, although some coordinate conversions use none. Each coordinate operation using the method assigns values to these parameters.
DefaultSingleOperation,
Serialized Form
| referencing/geotk-referencing (download) | View source code for this class |
| Field Summary | |
|---|---|
protected Integer |
sourceDimension
Number of dimensions in the source CRS of this operation method. |
protected Integer |
targetDimension
Number of dimensions in the target CRS of this operation method. |
| Fields inherited from class FormattableObject |
|---|
EPSG, GEOTIFF, INTERNAL, OGC, SINGLE_LINE |
| Fields inherited from interface OperationMethod |
|---|
FORMULA_KEY |
| Fields inherited from interface IdentifiedObject |
|---|
ALIAS_KEY, IDENTIFIERS_KEY, NAME_KEY, REMARKS_KEY |
| Constructor Summary | |
|---|---|
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. |
|
DefaultOperationMethod(OperationMethod method)
Constructs a new operation method with the same values than the specified one. |
|
DefaultOperationMethod(OperationMethod method,
Integer sourceDimension,
Integer targetDimension)
Constructs a new operation method with the same values than the specified one except the dimensions. |
|
| Method Summary | |
|---|---|
static void |
checkDimensions(OperationMethod method,
MathTransform transform)
Checks if an operation method and a math transform have a compatible number of source and target dimensions. |
protected int |
computeHashCode()
Computes a hash value for this identified object. |
boolean |
equals(Object object,
ComparisonMode mode)
Compares this operation method with the specified object for equality. |
String |
formatWKT(Formatter formatter)
Formats the inner part of a Well Known Text (WKT) element. |
Formula |
getFormula()
Formula(s) or procedure used by this operation 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. |
| Methods inherited from class AbstractIdentifiedObject |
|---|
equals, getAlias, getIdentifier, getIdentifiers, getName, getName, getRemarks, hashCode, nameMatches |
| Methods inherited from class FormattableObject |
|---|
getDefaultIndentation, print, setDefaultIndentation, toString, toWKT, toWKT, toWKT |
| Methods inherited from class Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface IdentifiedObject |
|---|
getAlias, getIdentifiers, getName, getRemarks, toWKT |
| Field Detail |
|---|
protected final Integer sourceDimension
null if this method can work with any number of
source dimensions (e.g. Affine Transform).
protected final Integer targetDimension
null if this method can work with any number of
target dimensions (e.g. Affine Transform).
| Constructor Detail |
|---|
public DefaultOperationMethod(MathTransform transform)
transform - The math transform to describe.public DefaultOperationMethod(OperationMethod method)
method - The operation method to copy.
public DefaultOperationMethod(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 copy.sourceDimension - Number of dimensions in the source CRS of this operation method.targetDimension - Number of dimensions in the target CRS of this operation method.
public DefaultOperationMethod(Map<String,?> properties,
Integer sourceDimension,
Integer targetDimension,
ParameterDescriptorGroup parameters)
| Property name | Value type | Value given to |
|---|---|---|
| "formula" | Formula, Citation or CharSequence |
getFormula() |
The source and target dimensions may be null if this method can work
with any number of dimensions (e.g. Affine Transform).
properties - Set of properties. Should contains at least "name".sourceDimension - Number of dimensions in the source CRS of this operation method.targetDimension - Number of dimensions in the target CRS of this operation method.parameters - The set of parameters, or null if none.| Method Detail |
|---|
public Formula getFormula()
getFormula in interface OperationMethodpublic Integer getSourceDimensions()
getSourceDimensions in interface OperationMethodpublic Integer getTargetDimensions()
getTargetDimensions in interface OperationMethodpublic ParameterDescriptorGroup getParameters()
getParameters in interface OperationMethod
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 LenientComparableequals in class AbstractIdentifiedObjectobject - 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.protected int computeHashCode()
AbstractIdentifiedObject.hashCode() when first needed.
Implementation specific feature
In the Geotk implementation, the name, identifiers and remarks are not used for hash code computation.
Consequently two identified objects will return the same hash value if they are equal in the
sense of equals(…,
ComparisonMode.IGNORE_METADATA). This feature allows users to
implement metadata-insensitive HashMap.
computeHashCode in class AbstractIdentifiedObjectpublic String formatWKT(Formatter formatter)
formatWKT in interface FormattableformatWKT in class FormattableObjectformatter - The formatter to use.
FormattableObject.toWKT(),
FormattableObject.toString()
public static void checkDimensions(OperationMethod method,
MathTransform transform)
throws MismatchedDimensionException
This convenience method is provided for argument checking.
method - The operation method to compare to the math transform, or null.transform - The math transform to compare to the operation method, or null.
MismatchedDimensionException - if the number of dimensions are incompatibles.ConcatenatedTransform and PassThroughTransform works
only for Geotk implementations.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||