public class DefaultCoordinateOperationFactory extends AbstractFactory implements CoordinateOperationFactory
operation method
, which can be
fetched from a set of predefined methods or
built explicitly.Defined in the sis-referencing
module
Constructor and Description |
---|
DefaultCoordinateOperationFactory()
Constructs a factory with no default properties.
|
DefaultCoordinateOperationFactory(Map<String,?> properties,
MathTransformFactory mtFactory)
Constructs a factory with the given default properties.
|
Modifier and Type | Method and Description |
---|---|
protected Map<String,?> |
complete(Map<String,?> properties)
Returns the union of the given
properties map with the default properties given at
construction time. |
CoordinateOperation |
createConcatenatedOperation(Map<String,?> properties,
CoordinateOperation... operations)
Creates an ordered sequence of two or more single coordinate operations.
|
Conversion |
createDefiningConversion(Map<String,?> properties,
OperationMethod method,
ParameterValueGroup parameters)
Creates a defining conversion from the given operation parameters.
|
CoordinateOperation |
createOperation(CoordinateReferenceSystem sourceCRS,
CoordinateReferenceSystem targetCRS)
Not yet implemented.
|
CoordinateOperation |
createOperation(CoordinateReferenceSystem sourceCRS,
CoordinateReferenceSystem targetCRS,
OperationMethod method)
Not yet implemented.
|
OperationMethod |
createOperationMethod(Map<String,?> properties,
Integer sourceDimensions,
Integer targetDimensions,
ParameterDescriptorGroup parameters)
Creates an operation method from a set of properties and a descriptor group.
|
SingleOperation |
createSingleOperation(Map<String,?> properties,
CoordinateReferenceSystem sourceCRS,
CoordinateReferenceSystem targetCRS,
CoordinateReferenceSystem interpolationCRS,
OperationMethod method,
MathTransform transform)
Creates a transformation or conversion from the given properties.
|
OperationMethod |
getOperationMethod(String name)
Returns the operation method of the given name.
|
getVendor
public DefaultCoordinateOperationFactory()
public DefaultCoordinateOperationFactory(Map<String,?> properties, MathTransformFactory mtFactory)
DefaultCoordinateOperationFactory
will fallback on the map given to this constructor
for any property not present in the map provided to a createFoo(Map<String,?>, …)
method.properties
- The default properties, or null
if none.mtFactory
- The factory to use for creating
math transforms,
or null
for the default factory.protected Map<String,?> complete(Map<String,?> properties)
properties
map with the default properties given at
construction time.
Entries in the given properties map have precedence, even if their
value is null
(i.e. a null value "erase" the default property value).
Entries with null value after the union will be omitted.
This method is invoked by all createFoo(Map<String,?>, …)
methods for determining
the properties to give to coordinate operation constructor.
properties
- The user-supplied properties.public OperationMethod getOperationMethod(String name) throws FactoryException
"EPSG:9807"
).
The search is case-insensitive and comparisons against method names can be
heuristic.
If more than one method match the given name, then the first (according iteration order) non-deprecated matching method is returned. If all matching methods are deprecated, the first one is returned.
name
- The name of the operation method to fetch.FactoryException
- if the requested operation method can not be fetched.DefaultMathTransformFactory.getOperationMethod(String)
public OperationMethod createOperationMethod(Map<String,?> properties, Integer sourceDimensions, Integer targetDimensions, ParameterDescriptorGroup parameters) throws FactoryException
null
if the method can work
with any number of dimensions (e.g. Affine Transform).
The properties given in argument follow the same rules than for the operation method constructor. The following table is a reminder of main (not all) properties:
Property name | Value type | Returned by |
---|---|---|
"name" | Identifier or String |
AbstractIdentifiedObject.getName() |
"alias" | GenericName or CharSequence (optionally as array) |
AbstractIdentifiedObject.getAlias() |
"identifiers" | Identifier (optionally as array) |
AbstractIdentifiedObject.getIdentifiers() |
"formula" | Formula , Citation or CharSequence |
DefaultOperationMethod.getFormula() |
properties
- Set of properties. Shall contain at least "name"
.sourceDimensions
- Number of dimensions in the source CRS of this operation method, or null
.targetDimensions
- Number of dimensions in the target CRS of this operation method, or null
.parameters
- Description of parameters expected by this operation.FactoryException
- if the object creation failed.DefaultOperationMethod.DefaultOperationMethod(Map, Integer, Integer, ParameterDescriptorGroup)
public Conversion createDefiningConversion(Map<String,?> properties, OperationMethod method, ParameterValueGroup parameters) throws FactoryException
The properties given in argument follow the same rules than for the coordinate conversion constructor. The following table is a reminder of main (not all) properties:
Property name | Value type | Returned by |
---|---|---|
"name" | Identifier or String |
AbstractIdentifiedObject.getName() |
"identifiers" | Identifier (optionally as array) |
AbstractIdentifiedObject.getIdentifiers() |
"domainOfValidity" | Extent |
AbstractCoordinateOperation.getDomainOfValidity() |
createDefiningConversion
in interface CoordinateOperationFactory
properties
- The properties to be given to the identified object.method
- The operation method.parameters
- The parameter values.FactoryException
- if the object creation failed.DefaultConversion.DefaultConversion(Map, OperationMethod, MathTransform, ParameterValueGroup)
public SingleOperation createSingleOperation(Map<String,?> properties, CoordinateReferenceSystem sourceCRS, CoordinateReferenceSystem targetCRS, CoordinateReferenceSystem interpolationCRS, OperationMethod method, MathTransform transform) throws FactoryException
Transformation
, a Conversion
or a Projection
sub-type
(CylindricalProjection
, ConicProjection
or PlanarProjection
)
using the information provided by the given method.
The properties given in argument follow the same rules than for the coordinate operation constructor. The following table is a reminder of main (not all) properties:
Property name | Value type | Returned by |
---|---|---|
"name" | Identifier or String |
AbstractIdentifiedObject.getName() |
"identifiers" | Identifier (optionally as array) |
AbstractIdentifiedObject.getIdentifiers() |
"domainOfValidity" | Extent |
AbstractCoordinateOperation.getDomainOfValidity() |
properties
- The properties to be given to the identified object.sourceCRS
- The source CRS.targetCRS
- The target CRS.interpolationCRS
- The CRS of additional coordinates needed for the operation, or null
if none.method
- The coordinate operation method (mandatory in all cases).transform
- Transform from positions in the source CRS to positions in the target CRS.FactoryException
- if the object creation failed.DefaultOperationMethod.getOperationType()
,
DefaultTransformation
,
DefaultConversion
public CoordinateOperation createConcatenatedOperation(Map<String,?> properties, CoordinateOperation... operations) throws FactoryException
The properties given in argument follow the same rules than for any other coordinate operation constructor. The following table is a reminder of main (not all) properties:
Property name | Value type | Returned by |
---|---|---|
"name" | Identifier or String |
AbstractIdentifiedObject.getName() |
"identifiers" | Identifier (optionally as array) |
AbstractIdentifiedObject.getIdentifiers() |
createConcatenatedOperation
in interface CoordinateOperationFactory
properties
- The properties to be given to the identified object.operations
- The sequence of operations. Shall contains at least two operations.FactoryException
- if the object creation failed.public CoordinateOperation createOperation(CoordinateReferenceSystem sourceCRS, CoordinateReferenceSystem targetCRS, OperationMethod method) throws FactoryException
createOperation
in interface CoordinateOperationFactory
sourceCRS
- Input coordinate reference system.targetCRS
- Output coordinate reference system.method
- the algorithmic method for conversion or transformation.sourceCRS
to targetCRS
.FactoryException
- if the operation creation failed.public CoordinateOperation createOperation(CoordinateReferenceSystem sourceCRS, CoordinateReferenceSystem targetCRS) throws OperationNotFoundException, FactoryException
createOperation
in interface CoordinateOperationFactory
sourceCRS
- Input coordinate reference system.targetCRS
- Output coordinate reference system.sourceCRS
to targetCRS
.OperationNotFoundException
- if no operation path was found from sourceCRS
to targetCRS
.FactoryException
- if the operation creation failed for some other reason.Copyright © 2010–2015 The Apache Software Foundation. All rights reserved.