org.geotools.referencing.operation
Class DefaultOperation

java.lang.Object
  extended byorg.geotools.referencing.wkt.Formattable
      extended byorg.geotools.referencing.AbstractIdentifiedObject
          extended byorg.geotools.referencing.operation.AbstractCoordinateOperation
              extended byorg.geotools.referencing.operation.DefaultSingleOperation
                  extended byorg.geotools.referencing.operation.DefaultOperation
All Implemented Interfaces:
org.opengis.referencing.operation.CoordinateOperation, org.opengis.referencing.IdentifiedObject, org.opengis.referencing.operation.Operation, java.io.Serializable, org.opengis.referencing.operation.SingleOperation
Direct Known Subclasses:
DefaultConversion, DefaultTransformation

public class DefaultOperation
extends DefaultSingleOperation
implements org.opengis.referencing.operation.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
Version:
$Id: DefaultOperation.java 17672 2006-01-19 00:25:55Z desruisseaux $
Author:
Martin Desruisseaux
See Also:
DefaultOperationMethod, Serialized Form

Field Summary
protected  org.opengis.referencing.operation.OperationMethod method
          The operation method.
 
Fields inherited from class org.geotools.referencing.operation.AbstractCoordinateOperation
EMPTY_ACCURACY_ARRAY, sourceCRS, targetCRS, transform, validArea
 
Fields inherited from class org.geotools.referencing.AbstractIdentifiedObject
EMPTY_ALIAS_ARRAY, EMPTY_IDENTIFIER_ARRAY, IDENTIFIER_COMPARATOR, NAME_COMPARATOR, REMARKS_COMPARATOR
 
Fields inherited from interface org.opengis.referencing.operation.CoordinateOperation
OPERATION_VERSION_KEY, POSITIONAL_ACCURACY_KEY, SCOPE_KEY, VALID_AREA_KEY
 
Fields inherited from interface org.opengis.referencing.IdentifiedObject
ALIAS_KEY, IDENTIFIERS_KEY, NAME_KEY, REMARKS_KEY
 
Constructor Summary
DefaultOperation(java.util.Map properties, org.opengis.referencing.crs.CoordinateReferenceSystem sourceCRS, org.opengis.referencing.crs.CoordinateReferenceSystem targetCRS, org.opengis.referencing.operation.MathTransform transform, org.opengis.referencing.operation.OperationMethod method)
          Constructs an operation from a set of properties.
 
Method Summary
static org.opengis.referencing.operation.CoordinateOperation create(java.util.Map properties, org.opengis.referencing.crs.CoordinateReferenceSystem sourceCRS, org.opengis.referencing.crs.CoordinateReferenceSystem targetCRS, org.opengis.referencing.operation.MathTransform transform, org.opengis.referencing.operation.OperationMethod method, java.lang.Class type)
          Returns a coordinate operation of the specified class.
 boolean equals(AbstractIdentifiedObject object, boolean compareMetadata)
          Compare this operation method with the specified object for equality.
 org.opengis.referencing.operation.OperationMethod getMethod()
          Returns the operation method.
 org.opengis.parameter.ParameterValueGroup getParameterValues()
          Returns the parameter values.
 int hashCode()
          Returns a hash code value for this operation method.
 
Methods inherited from class org.geotools.referencing.operation.AbstractCoordinateOperation
formatWKT, getAccuracy, getAccuracy, getMathTransform, getOperationVersion, getPositionalAccuracy, getScope, getSourceCRS, getTargetCRS, getType, getValidArea
 
Methods inherited from class org.geotools.referencing.AbstractIdentifiedObject
asSet, ensureAngularUnit, ensureLinearUnit, ensureNonNull, ensureNonNull, ensureTimeUnit, equals, equals, equals, equals, getAlias, getIdentifier, getIdentifier, getIdentifiers, getName, getName, getName, getProperties, getProperties, getRemarks, nameMatches, nameMatches
 
Methods inherited from class org.geotools.referencing.wkt.Formattable
toString, toWKT, toWKT, toWKT
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.opengis.referencing.operation.CoordinateOperation
getMathTransform, getOperationVersion, getPositionalAccuracy, getScope, getSourceCRS, getTargetCRS, getValidArea
 
Methods inherited from interface org.opengis.referencing.IdentifiedObject
getAlias, getIdentifiers, getName, getRemarks, toWKT
 

Field Detail

method

protected final org.opengis.referencing.operation.OperationMethod method
The operation method.

Constructor Detail

DefaultOperation

public DefaultOperation(java.util.Map properties,
                        org.opengis.referencing.crs.CoordinateReferenceSystem sourceCRS,
                        org.opengis.referencing.crs.CoordinateReferenceSystem targetCRS,
                        org.opengis.referencing.operation.MathTransform transform,
                        org.opengis.referencing.operation.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.
Method Detail

create

public static org.opengis.referencing.operation.CoordinateOperation create(java.util.Map properties,
                                                                           org.opengis.referencing.crs.CoordinateReferenceSystem sourceCRS,
                                                                           org.opengis.referencing.crs.CoordinateReferenceSystem targetCRS,
                                                                           org.opengis.referencing.operation.MathTransform transform,
                                                                           org.opengis.referencing.operation.OperationMethod method,
                                                                           java.lang.Class 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 .
type - The minimal type as Conversion.class, Projection.class, etc. This method may create an instance of a subclass of .
See Also:
DefaultConversion.create(org.opengis.referencing.operation.Conversion, org.opengis.referencing.crs.CoordinateReferenceSystem, org.opengis.referencing.crs.CoordinateReferenceSystem, org.opengis.referencing.operation.MathTransform)

getMethod

public org.opengis.referencing.operation.OperationMethod getMethod()
Returns the operation method.

Specified by:
getMethod in interface org.opengis.referencing.operation.Operation

getParameterValues

public org.opengis.parameter.ParameterValueGroup getParameterValues()
                                                             throws java.lang.UnsupportedOperationException
Returns the parameter values. The default implementation infer the parameter values from the transform, if possible.

Specified by:
getParameterValues in interface org.opengis.referencing.operation.Operation
Throws:
java.lang.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 is , then all available properties are compared including formula.

Overrides:
equals in class AbstractCoordinateOperation
Parameters:
object - The object to compare to .
compareMetadata - for performing a strict comparaison, or for comparing only properties relevant to transformations.
Returns:
if both objects are equal.

hashCode

public int hashCode()
Returns a hash code value for this operation method.

Overrides:
hashCode in class AbstractCoordinateOperation


Copyright © GeoTools. All Rights Reserved.