org.opengis.example.referencing
Class SimpleTransformFactory

Object
  extended by SimpleTransformFactory
All Implemented Interfaces:
MathTransformFactory, Factory

public class SimpleTransformFactory
extends Object
implements MathTransformFactory

A MathTransformFactory for creating SimpleTransform instances. The only methods supported by this simple implementation are:

Since:
3.1

Constructor Summary
SimpleTransformFactory()
          Creates a new factory.
 
Method Summary
 MathTransform createAffineTransform(Matrix matrix)
          Creates an affine transform from a matrix.
 MathTransform createBaseToDerived(CoordinateReferenceSystem baseCRS, ParameterValueGroup parameters, CoordinateSystem derivedCS)
          Creates a parameterized transform from a base CRS to a derived CS.
 MathTransform createConcatenatedTransform(MathTransform transform1, MathTransform transform2)
          Creates a transform by concatenating two existing transforms.
 MathTransform createFromWKT(String wkt)
          Creates a transform from a WKT string.
 MathTransform createFromXML(String xml)
          Creates a transform from a XML string.
 MathTransform createParameterizedTransform(ParameterValueGroup parameters)
          Creates a transform from a group of parameters.
 MathTransform createPassThroughTransform(int firstAffectedOrdinate, MathTransform subTransform, int numTrailingOrdinates)
          Creates a transform which passes through a subset of ordinates to another transform.
 Set<OperationMethod> getAvailableMethods(Class<? extends SingleOperation> type)
          Returns a set of available methods for math transforms.
 ParameterValueGroup getDefaultParameters(String method)
          Returns the default parameter values for a math transform using the given method.
 OperationMethod getLastMethodUsed()
          Returns the operation method used for the latest call to createParameterizedTransform, or null if not applicable.
 Citation getVendor()
          Returns the implementor of this factory.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleTransformFactory

public SimpleTransformFactory()
Creates a new factory.

Method Detail

getVendor

public Citation getVendor()
Returns the implementor of this factory.

Specified by:
getVendor in interface Factory

getAvailableMethods

public Set<OperationMethod> getAvailableMethods(Class<? extends SingleOperation> type)
Returns a set of available methods for math transforms. The default implementation returns an empty set.

Specified by:
getAvailableMethods in interface MathTransformFactory

getLastMethodUsed

public OperationMethod getLastMethodUsed()
Returns the operation method used for the latest call to createParameterizedTransform, or null if not applicable. The default implementation returns null in all cases.

Specified by:
getLastMethodUsed in interface MathTransformFactory

getDefaultParameters

public ParameterValueGroup getDefaultParameters(String method)
                                         throws NoSuchIdentifierException
Returns the default parameter values for a math transform using the given method. The default implementation throws an exception in all cases since parameterized transforms are not implemented by this simple factory.

Specified by:
getDefaultParameters in interface MathTransformFactory
Throws:
NoSuchIdentifierException

createBaseToDerived

public MathTransform createBaseToDerived(CoordinateReferenceSystem baseCRS,
                                         ParameterValueGroup parameters,
                                         CoordinateSystem derivedCS)
                                  throws FactoryException
Creates a parameterized transform from a base CRS to a derived CS. The default implementation throws an exception in all cases since parameterized transforms are not implemented by this simple factory.

Specified by:
createBaseToDerived in interface MathTransformFactory
Throws:
FactoryException

createParameterizedTransform

public MathTransform createParameterizedTransform(ParameterValueGroup parameters)
                                           throws FactoryException
Creates a transform from a group of parameters. The default implementation throws an exception in all cases since parameterized transforms are not implemented by this simple factory.

Specified by:
createParameterizedTransform in interface MathTransformFactory
Throws:
FactoryException

createAffineTransform

public MathTransform createAffineTransform(Matrix matrix)
                                    throws FactoryException
Creates an affine transform from a matrix. If the transform's input dimension is M, and output dimension is N, then the matrix will have size [N+1][M+1]. The +1 in the matrix dimensions allows the matrix to do a shift, as well as a rotation. The [M][j] element of the matrix will be the j'th ordinate of the moved origin. The [i][N] element of the matrix will be 0 for i less than M, and 1 for i equals M.

Specified by:
createAffineTransform in interface MathTransformFactory
Parameters:
matrix - The matrix used to define the affine transform.
Returns:
The affine transform.
Throws:
FactoryException - if the object creation failed.
See Also:
AffineTransform2D, ProjectiveTransform

createConcatenatedTransform

public MathTransform createConcatenatedTransform(MathTransform transform1,
                                                 MathTransform transform2)
                                          throws FactoryException
Creates a transform by concatenating two existing transforms. The default implementation throws an exception in all cases since concatenated transforms are not implemented by this simple factory.

Specified by:
createConcatenatedTransform in interface MathTransformFactory
Throws:
FactoryException

createPassThroughTransform

public MathTransform createPassThroughTransform(int firstAffectedOrdinate,
                                                MathTransform subTransform,
                                                int numTrailingOrdinates)
                                         throws FactoryException
Creates a transform which passes through a subset of ordinates to another transform. The default implementation throws an exception in all cases since pass through transforms are not implemented by this simple factory.

Specified by:
createPassThroughTransform in interface MathTransformFactory
Throws:
FactoryException

createFromXML

public MathTransform createFromXML(String xml)
                            throws FactoryException
Creates a transform from a XML string. The default implementation throws an exception in all cases since XML parsing is not implemented by this simple factory.

Specified by:
createFromXML in interface MathTransformFactory
Throws:
FactoryException

createFromWKT

public MathTransform createFromWKT(String wkt)
                            throws FactoryException
Creates a transform from a WKT string. The default implementation throws an exception in all cases since WKT parsing is not implemented by this simple factory.

Specified by:
createFromWKT in interface MathTransformFactory
Throws:
FactoryException


Copyright © 1994–2014 Open Geospatial Consortium. All rights reserved.