|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.geotools.factory.AbstractFactory org.geotools.referencing.factory.AbstractFactory org.geotools.referencing.operation.AbstractCoordinateOperationFactory
Base class for coordinate operation factories. This class provides helper methods for the construction of building blocks. It doesn't figure out any operation path by itself. This more "intelligent" job is left to subclasses.
Field Summary | |
protected static org.opengis.metadata.Identifier |
AXIS_CHANGES
The identifier for conversion using an affine transform for axis swapping and/or unit conversions. |
protected static org.opengis.metadata.Identifier |
DATUM_SHIFT
The identifier for a transformation which is a datum shift. |
protected static org.opengis.metadata.Identifier |
ELLIPSOID_SHIFT
The identifier for a transformation which is a datum shift without Bursa Wolf parameters. |
protected static org.opengis.metadata.Identifier |
GEOCENTRIC_CONVERSION
The identifier for a geocentric conversion. |
protected static org.opengis.metadata.Identifier |
IDENTITY
The identifier for an identity operation. |
protected static org.opengis.metadata.Identifier |
INVERSE_OPERATION
The identifier for an inverse operation. |
protected org.opengis.referencing.operation.MathTransformFactory |
mtFactory
The underlying math transform factory. |
Fields inherited from class org.geotools.referencing.factory.AbstractFactory |
LOGGER |
Fields inherited from class org.geotools.factory.AbstractFactory |
hints, MAXIMUM_PRIORITY, MINIMUM_PRIORITY, NORMAL_PRIORITY, priority |
Constructor Summary | |
AbstractCoordinateOperationFactory(Hints hints)
Constructs a coordinate operation factory using the specified hints. |
|
AbstractCoordinateOperationFactory(Hints hints,
int priority)
Constructs a coordinate operation factory using the specified hints and priority. |
Method Summary | |
protected org.opengis.referencing.operation.CoordinateOperation |
concatenate(org.opengis.referencing.operation.CoordinateOperation step1,
org.opengis.referencing.operation.CoordinateOperation step2)
Concatenate two operation steps. |
protected org.opengis.referencing.operation.CoordinateOperation |
concatenate(org.opengis.referencing.operation.CoordinateOperation step1,
org.opengis.referencing.operation.CoordinateOperation step2,
org.opengis.referencing.operation.CoordinateOperation step3)
Concatenate three transformation steps. |
org.opengis.referencing.operation.CoordinateOperation |
createConcatenatedOperation(java.util.Map properties,
org.opengis.referencing.operation.CoordinateOperation[] operations)
Creates a concatenated operation from a sequence of operations. |
protected org.opengis.referencing.operation.CoordinateOperation |
createFromAffineTransform(org.opengis.metadata.Identifier name,
org.opengis.referencing.crs.CoordinateReferenceSystem sourceCRS,
org.opengis.referencing.crs.CoordinateReferenceSystem targetCRS,
org.opengis.referencing.operation.Matrix matrix)
Creates a coordinate operation from a matrix, which usually describes an affine tranform. |
protected org.opengis.referencing.operation.CoordinateOperation |
createFromMathTransform(org.opengis.metadata.Identifier name,
org.opengis.referencing.crs.CoordinateReferenceSystem sourceCRS,
org.opengis.referencing.crs.CoordinateReferenceSystem targetCRS,
org.opengis.referencing.operation.MathTransform transform)
Creates a coordinate operation from a math transform. |
protected org.opengis.referencing.operation.CoordinateOperation |
createFromMathTransform(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)
Creates a coordinate operation from a math transform. |
protected org.opengis.referencing.operation.CoordinateOperation |
createFromParameters(org.opengis.metadata.Identifier name,
org.opengis.referencing.crs.CoordinateReferenceSystem sourceCRS,
org.opengis.referencing.crs.CoordinateReferenceSystem targetCRS,
org.opengis.parameter.ParameterValueGroup parameters)
Creates a coordinate operation from a set of parameters. |
protected static void |
ensureNonNull(java.lang.String name,
java.lang.Object object)
Makes sure an argument is non-null. |
protected static java.lang.String |
getErrorMessage(org.opengis.referencing.IdentifiedObject source,
org.opengis.referencing.IdentifiedObject target)
Returns an error message for "No path found from sourceCRS to targetCRS". |
java.util.Map |
getImplementationHints()
Returns the implementation hints for this factory. |
org.opengis.referencing.operation.MathTransformFactory |
getMathTransformFactory()
Returns the underlying math transform factory. |
protected org.opengis.referencing.operation.Matrix |
swapAndScaleAxis(org.opengis.referencing.cs.CoordinateSystem sourceCS,
org.opengis.referencing.cs.CoordinateSystem targetCS)
Returns an affine transform between two coordinate systems. |
Methods inherited from class org.geotools.referencing.factory.AbstractFactory |
getVendor |
Methods inherited from class org.geotools.factory.AbstractFactory |
onDeregistration, onRegistration |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.opengis.referencing.operation.CoordinateOperationFactory |
createOperation, createOperation |
Methods inherited from interface org.opengis.referencing.Factory |
getVendor |
Field Detail |
protected static final org.opengis.metadata.Identifier IDENTITY
protected static final org.opengis.metadata.Identifier AXIS_CHANGES
protected static final org.opengis.metadata.Identifier DATUM_SHIFT
PositionalAccuracyImpl.DATUM_SHIFT_APPLIED
protected static final org.opengis.metadata.Identifier ELLIPSOID_SHIFT
Hints.LENIENT_DATUM_SHIFT
set to
Boolean.TRUE
.
PositionalAccuracyImpl.DATUM_SHIFT_OMITTED
protected static final org.opengis.metadata.Identifier GEOCENTRIC_CONVERSION
protected static final org.opengis.metadata.Identifier INVERSE_OPERATION
protected final org.opengis.referencing.operation.MathTransformFactory mtFactory
MathTransform
objects for
all coordinate operations.
Constructor Detail |
public AbstractCoordinateOperationFactory(Hints hints)
CRS
, CS
,
DATUM
and MATH_TRANSFORM
hints. In addition, the FactoryGroup.HINT_KEY
hint may be used as
a low-level substitute for all the above.
hints
- The hints, or if none.public AbstractCoordinateOperationFactory(Hints hints, int priority)
CRS
, CS
,
DATUM
and MATH_TRANSFORM
hints. In addition, the FactoryGroup.HINT_KEY
hint may be used as
a low-level substitute for all the above.
hints
- The hints, or if none.priority
- The priority for this factory, as a number between
MINIMUM_PRIORITY
and
MAXIMUM_PRIORITY
inclusive.Method Detail |
public java.util.Map getImplementationHints()
CRS
, CS
, DATUM
and MATH_TRANSFORM
hints. Other values
may be provided as well, at implementation choice.
getImplementationHints
in interface Factory
getImplementationHints
in class AbstractFactory
public final org.opengis.referencing.operation.MathTransformFactory getMathTransformFactory()
MathTransform
objects for
all coordinate operations.
protected org.opengis.referencing.operation.Matrix swapAndScaleAxis(org.opengis.referencing.cs.CoordinateSystem sourceCS, org.opengis.referencing.cs.CoordinateSystem targetCS) throws org.opengis.referencing.operation.OperationNotFoundException
Example: If coordinates in are (x,y) pairs in metres and coordinates in are (-y,x) pairs in centimetres, then the transformation can be performed as below:
[-y(cm)] [ 0 -100 0 ] [x(m)] [ x(cm)] = [ 100 0 0 ] [y(m)] [ 1 ] [ 0 0 1 ] [1 ]
sourceCS
- The source coordinate system.targetCS
- The target coordinate system.
org.opengis.referencing.operation.OperationNotFoundException
- If the affine transform can't be constructed.AbstractCS.swapAndScaleAxis(org.opengis.referencing.cs.CoordinateSystem, org.opengis.referencing.cs.CoordinateSystem)
protected org.opengis.referencing.operation.CoordinateOperation createFromAffineTransform(org.opengis.metadata.Identifier name, org.opengis.referencing.crs.CoordinateReferenceSystem sourceCRS, org.opengis.referencing.crs.CoordinateReferenceSystem targetCRS, org.opengis.referencing.operation.Matrix matrix) throws org.opengis.referencing.FactoryException
OperationMethod
object is given to this transform. In the special case
where the identifier is DATUM_SHIFT
or ELLIPSOID_SHIFT
,
the operation will be an instance of Transformation
instead of the usual
Conversion
.
name
- The identifier for the operation to be created.sourceCRS
- The source coordinate reference system.targetCRS
- The target coordinate reference system.matrix
- The matrix which describe an affine transform operation.
org.opengis.referencing.FactoryException
- if the operation can't be created.protected org.opengis.referencing.operation.CoordinateOperation createFromParameters(org.opengis.metadata.Identifier name, org.opengis.referencing.crs.CoordinateReferenceSystem sourceCRS, org.opengis.referencing.crs.CoordinateReferenceSystem targetCRS, org.opengis.parameter.ParameterValueGroup parameters) throws org.opengis.referencing.FactoryException
name
- The identifier for the operation to be created.sourceCRS
- The source coordinate reference system.targetCRS
- The target coordinate reference system.parameters
- The parameters.
org.opengis.referencing.FactoryException
- if the operation can't be created.protected org.opengis.referencing.operation.CoordinateOperation createFromMathTransform(org.opengis.metadata.Identifier name, org.opengis.referencing.crs.CoordinateReferenceSystem sourceCRS, org.opengis.referencing.crs.CoordinateReferenceSystem targetCRS, org.opengis.referencing.operation.MathTransform transform) throws org.opengis.referencing.FactoryException
name
- The identifier for the operation to be created.sourceCRS
- The source coordinate reference system.targetCRS
- The destination coordinate reference system.transform
- The math transform.
org.opengis.referencing.FactoryException
- if the operation can't be constructed.protected org.opengis.referencing.operation.CoordinateOperation createFromMathTransform(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) throws org.opengis.referencing.FactoryException
properties
- The properties to give to the operation.sourceCRS
- The source coordinate reference system.targetCRS
- The destination coordinate reference system.transform
- The math transform.method
- The operation method, or .type
- The required super-class (e.g. Transformation
.class
).
org.opengis.referencing.FactoryException
- if the operation can't be constructed.public org.opengis.referencing.operation.CoordinateOperation createConcatenatedOperation(java.util.Map properties, org.opengis.referencing.operation.CoordinateOperation[] operations) throws org.opengis.referencing.FactoryException
createConcatenatedOperation
in interface org.opengis.referencing.operation.CoordinateOperationFactory
properties
- Set of properties. Should contains at least .operations
- The sequence of operations.
org.opengis.referencing.FactoryException
- if the object creation failed.protected org.opengis.referencing.operation.CoordinateOperation concatenate(org.opengis.referencing.operation.CoordinateOperation step1, org.opengis.referencing.operation.CoordinateOperation step2) throws org.opengis.referencing.FactoryException
AXIS_CHANGES
,
it will be included as part of the second operation instead of creating an
ConcatenatedOperation
. If a concatenated operation is created, it
will get an automatically generated name.
step1
- The first step, or for the identity operation.step2
- The second step, or for the identity operation.
org.opengis.referencing.FactoryException
- if the operation can't be constructed.protected org.opengis.referencing.operation.CoordinateOperation concatenate(org.opengis.referencing.operation.CoordinateOperation step1, org.opengis.referencing.operation.CoordinateOperation step2, org.opengis.referencing.operation.CoordinateOperation step3) throws org.opengis.referencing.FactoryException
AXIS_CHANGES
, it will be included as part of the second operation instead of
creating an ConcatenatedOperation
. If a concatenated operation is created, it
will get an automatically generated name.
step1
- The first step, or for the identity operation.step2
- The second step, or for the identity operation.step3
- The third step, or for the identity operation.
org.opengis.referencing.FactoryException
- if the operation can't be constructed.protected static java.lang.String getErrorMessage(org.opengis.referencing.IdentifiedObject source, org.opengis.referencing.IdentifiedObject target)
OperationNotFoundException
.
source
- The source CRS.target
- The target CRS.
protected static void ensureNonNull(java.lang.String name, java.lang.Object object) throws java.lang.IllegalArgumentException
name
- Argument name.object
- User argument.
java.lang.IllegalArgumentException
- if is null.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |