| org.geotools.referencing.factory.ReferencingFactory org.geotools.referencing.factory.ReferencingFactoryContainer
All known Subclasses: org.geotools.referencing.factory.FactoryGroup,
ReferencingFactoryContainer | public class ReferencingFactoryContainer extends ReferencingFactory (Code) | | A set of utilities methods working on factories. Many of those methods requires more than
one factory. Consequently, they can't be a method in a single factory. Furthermore, since
they are helper methods and somewhat implementation-dependent, they are not part of GeoAPI.
since: 2.4 version: $Id: ReferencingFactoryContainer.java 26090 2007-06-29 08:09:27Z desruisseaux $ author: Martin Desruisseaux |
Constructor Summary | |
public | ReferencingFactoryContainer(DatumFactory datumFactory, CSFactory csFactory, CRSFactory crsFactory, MathTransformFactory mtFactory) Constructs an instance using the specified factories. | public | ReferencingFactoryContainer(Hints userHints) Creates an instance from the specified hints. |
Method Summary | |
public MathTransform | createBaseToDerived(CoordinateReferenceSystem baseCRS, ParameterValueGroup parameters, CoordinateSystem derivedCS) Creates a
from a base
CRS to a derived CS. | public MathTransform | createBaseToDerived(CoordinateReferenceSystem baseCRS, ParameterValueGroup parameters, CoordinateSystem derivedCS, Collection methods) Creates a
from a base
CRS to a derived CS. | public MathTransform | createParameterizedTransform(ParameterValueGroup parameters) Creates a transform from a group of parameters. | public MathTransform | createParameterizedTransform(ParameterValueGroup parameters, Collection methods) Creates a transform from a group of parameters and add the method used to a list.
This variant of
createParameterizedTransform(...) provides a way for
the client to keep trace of any
used by this factory. | public ProjectedCRS | createProjectedCRS(Map properties, GeographicCRS baseCRS, Conversion conversionFromBase, CartesianCS derivedCS) Creates a projected coordinate reference system from a conversion. | public ProjectedCRS | createProjectedCRS(Map properties, GeographicCRS baseCRS, OperationMethod method, ParameterValueGroup parameters, CartesianCS derivedCS) Creates a projected coordinate reference system from a set of parameters. | public CRSFactory | getCRSFactory() Returns the
factory. | public CSFactory | getCSFactory() Returns the
factory. | public DatumFactory | getDatumFactory() Returns the
factory. | public Map | getImplementationHints() Returns all factories in this group. | public OperationMethod | getLastUsedMethod() Returns the operation method for the last call to a
create method in the currently
running thread. | public MathTransformFactory | getMathTransformFactory() Returns the
factory. | public OperationMethod | getOperationMethod(String name) Returns the operation method for the specified name.
If the
is the
, then this method just
delegates the call to it. | public static ReferencingFactoryContainer | instance(Hints hints) Creates an instance from the specified hints. | public CoordinateReferenceSystem | separate(CoordinateReferenceSystem crs, int[] dimensions) Returns a new coordinate reference system with only the specified dimension.
This method is used for example in order to get a component of a
.
Parameters: crs - The original (usually compound) CRS. Parameters: dimensions - The dimensions to keep. | public CoordinateReferenceSystem | toGeodetic3D(CompoundCRS crs) Converts a 2D + 1D compound CRS into a 3D CRS, if possible. |
ReferencingFactoryContainer | public ReferencingFactoryContainer(DatumFactory datumFactory, CSFactory csFactory, CRSFactory crsFactory, MathTransformFactory mtFactory)(Code) | | Constructs an instance using the specified factories. If any factory is null,
a default instance will be created by
ReferencingFactoryFinder when first needed.
Parameters: datumFactory - The factory. Parameters: csFactory - The factory. Parameters: crsFactory - The factory. Parameters: mtFactory - The factory.ReferencingFactoryContainer.createInstance createInstance |
createBaseToDerived | public MathTransform createBaseToDerived(CoordinateReferenceSystem baseCRS, ParameterValueGroup parameters, CoordinateSystem derivedCS) throws NoSuchIdentifierException, FactoryException(Code) | | Creates a
from a base
CRS to a derived CS. If the
"semi_major" and
"semi_minor" parameters are
not explicitly specified, they will be inferred from the
and added to
parameters . In addition, this method performs axis switch as needed.
The
used can be obtained by a call to
ReferencingFactoryContainer.getLastUsedMethod .
Parameters: baseCRS - The source coordinate reference system. Parameters: parameters - The parameter values for the transform. Parameters: derivedCS - the target coordinate system. The parameterized transform. throws: NoSuchIdentifierException - if there is no transform registered for the method. throws: FactoryException - if the object creation failed. This exception is thrownif some required parameter has not been supplied, or has illegal value. |
createBaseToDerived | public MathTransform createBaseToDerived(CoordinateReferenceSystem baseCRS, ParameterValueGroup parameters, CoordinateSystem derivedCS, Collection methods) throws NoSuchIdentifierException, FactoryException(Code) | | Creates a
from a base
CRS to a derived CS. If the "semi_major" and "semi_minor"
parameters are not explicitly specified, they will be inferred from the
and added to
parameters .
In addition, this method performs axis switch as needed.
Parameters: baseCRS - The source coordinate reference system. Parameters: parameters - The parameter values for the transform. Parameters: derivedCS - the target coordinate system. Parameters: methods - A collection where to add the operation method that apply to the transform,or null if none. The parameterized transform. throws: NoSuchIdentifierException - if there is no transform registered for the method. throws: FactoryException - if the object creation failed. This exception is thrownif some required parameter has not been supplied, or has illegal value.ReferencingFactoryContainer.createBaseToDerivedReferencingFactoryContainer.getLastUsedMethod |
createParameterizedTransform | public MathTransform createParameterizedTransform(ParameterValueGroup parameters) throws NoSuchIdentifierException, FactoryException(Code) | | Creates a transform from a group of parameters. This method delegates the work to the
and keep trace
of the
used. The later can be obtained
by a call to
ReferencingFactoryContainer.getLastUsedMethod .
Parameters: parameters - The parameter values. The parameterized transform. throws: NoSuchIdentifierException - if there is no transform registered for the method. throws: FactoryException - if the object creation failed. This exception is thrownif some required parameter has not been supplied, or has illegal value. See Also: MathTransformFactory.createParameterizedTransform |
createParameterizedTransform | public MathTransform createParameterizedTransform(ParameterValueGroup parameters, Collection methods) throws NoSuchIdentifierException, FactoryException(Code) | | Creates a transform from a group of parameters and add the method used to a list.
This variant of
createParameterizedTransform(...) provides a way for
the client to keep trace of any
used by this factory.
Parameters: parameters - The parameter values. Parameters: methods - A collection where to add the operation method that apply to the transform,or null if none. The parameterized transform. throws: NoSuchIdentifierException - if there is no transform registered for the method. throws: FactoryException - if the object creation failed. This exception is thrownif some required parameter has not been supplied, or has illegal value.ReferencingFactoryContainer.createParameterizedTransform(ParameterValueGroup)ReferencingFactoryContainer.getLastUsedMethod |
createProjectedCRS | public ProjectedCRS createProjectedCRS(Map properties, GeographicCRS baseCRS, Conversion conversionFromBase, CartesianCS derivedCS) throws FactoryException(Code) | | Creates a projected coordinate reference system from a conversion.
Parameters: properties - Name and other properties to give to the new object. Parameters: baseCRS - Geographic coordinate reference system to base projection on. Parameters: conversionFromBase - The . Parameters: derivedCS - The coordinate system for the projected CRS. throws: FactoryException - if the object creation failed. |
createProjectedCRS | public ProjectedCRS createProjectedCRS(Map properties, GeographicCRS baseCRS, OperationMethod method, ParameterValueGroup parameters, CartesianCS derivedCS) throws FactoryException(Code) | | Creates a projected coordinate reference system from a set of parameters. If the
"semi_major" and
"semi_minor" parameters are not explicitly specified,
they will be inferred from the
and added to the
parameters . This method also checks for axis order and unit conversions.
Parameters: properties - Name and other properties to give to the new object. Parameters: baseCRS - Geographic coordinate reference system to base projection on. Parameters: method - The operation method, or null for a default one. Parameters: parameters - The parameter values to give to the projection. Parameters: derivedCS - The coordinate system for the projected CRS. throws: FactoryException - if the object creation failed. |
getCRSFactory | public CRSFactory getCRSFactory()(Code) | | Returns the
factory.
|
getCSFactory | public CSFactory getCSFactory()(Code) | | Returns the
factory.
|
getDatumFactory | public DatumFactory getDatumFactory()(Code) | | Returns the
factory.
|
getLastUsedMethod | public OperationMethod getLastUsedMethod()(Code) | | Returns the operation method for the last call to a
create method in the currently
running thread. This method may be invoked after any of the following methods:
The operation method for the last call to a create method, or null if none. See Also: DefaultMathTransformFactory.getLastUsedMethod |
getMathTransformFactory | public MathTransformFactory getMathTransformFactory()(Code) | | Returns the
factory.
|
getOperationMethod | public OperationMethod getOperationMethod(String name) throws NoSuchIdentifierException(Code) | | Returns the operation method for the specified name.
If the
is the
, then this method just
delegates the call to it. Otherwise this method scans all operations registered in the
math transform factory until a match is found.
Parameters: name - The case insensitive of the operation method to search for (e.g. "Transverse_Mercator" ). The operation method. throws: NoSuchIdentifierException - if there is no operation method registered for thespecified name. See Also: DefaultMathTransformFactory.getOperationMethod |
separate | public CoordinateReferenceSystem separate(CoordinateReferenceSystem crs, int[] dimensions) throws FactoryException(Code) | | Returns a new coordinate reference system with only the specified dimension.
This method is used for example in order to get a component of a
.
Parameters: crs - The original (usually compound) CRS. Parameters: dimensions - The dimensions to keep. The CRS with only the specified dimensions. |
toGeodetic3D | public CoordinateReferenceSystem toGeodetic3D(CompoundCRS crs) throws FactoryException(Code) | | Converts a 2D + 1D compound CRS into a 3D CRS, if possible. More specifically,
if the specified
is made of a
(or
) and a
CRS, and if the vertical CRS datum type is
, then this method
converts the compound CRS in a single 3D CRS. Otherwise, the
crs argument is
returned unchanged.
Parameters: crs - The compound CRS to converts in a 3D geographic or projected CRS. The 3D geographic or projected CRS, or crs if the change can't be applied. throws: FactoryException - if the object creation failed. |
|
|