Interface CoordinateOperationFactory

    • Method Detail

      • createOperation

        CoordinateOperation createOperation​(CoordinateReferenceSystem sourceCRS,
                                            CoordinateReferenceSystem targetCRS,
                                            OperationMethod method)
                                     throws OperationNotFoundException,
                                            FactoryException
        Returns an operation using a particular method for conversion or transformation between two coordinate reference systems.
        • If the operation exists on the implementation, then it is returned.
        • If the operation does not exist on the implementation, then the implementation has the option of inferring the operation from the argument objects.
        • If for whatever reason the specified operation will not be returned, then the exception is thrown.
        Example: A transformation between two geographic CRS using different datum requires a datum shift. Many methods exist for this purpose, including interpolations in a grid, a scale/rotation/translation in geocentric coordinates or the Molodenski approximation. When invoking createOperation(\u2026) without operation method, this factory may select by default the transformation specified by the authority. When invoking createOperation(\u2026) with an operation method, user can force usage of Molodenski approximation for instance.
        Parameters:
        sourceCRS - input coordinate reference system.
        targetCRS - output coordinate reference system.
        method - the algorithmic method for conversion or transformation.
        Returns:
        a coordinate operation from sourceCRS to targetCRS.
        Throws:
        OperationNotFoundException - if no operation path was found from sourceCRS to targetCRS.
        FactoryException - if the operation creation failed for some other reason.
        Departure from OGC/ISO specification:
        This method has been added at user request, in order to specify the desired transformation path when many are available.
      • createConcatenatedOperation

        CoordinateOperation createConcatenatedOperation​(Map<String,?> properties,
                                                        CoordinateOperation... operations)
                                                 throws FactoryException
        Creates a concatenated operation from a sequence of operations.
        Parameters:
        properties - name and other properties to give to the new object. Available properties are listed there.
        operations - the sequence of operations.
        Returns:
        the concatenated operation.
        Throws:
        FactoryException - if the object creation failed.
        Departure from OGC/ISO specification:
        This method has been added because OGC 01-009 does not define a factory method for creating such object.
      • createOperationMethod

        OperationMethod createOperationMethod​(Map<String,?> properties,
                                              Integer sourceDimension,
                                              Integer targetDimension,
                                              ParameterDescriptorGroup parameters)
                                       throws FactoryException
        Creates an operation method from a set of properties and a descriptor group. This factory method allows the creation of arbitrary OperationMethod instances. However some implementations may have a collection of build-in operation methods. For obtaining such build-in instance, see getOperationMethod(String) instead.

        Some available properties are listed there. Additionally, the following properties are understood by this constructor:

        Keys for additional standard properties
        Property name Value type Returned by
        "formula" Formula OperationMethod.getFormula()
        Parameters:
        properties - set of properties. Shall contains at least "name".
        sourceDimension - number of dimensions in the source CRS of the operation method, or null.
        targetDimension - number of dimensions in the target CRS of the operation method, or null.
        parameters - a description of the parameters for the operation method.
        Returns:
        the operation method.
        Throws:
        FactoryException - if the object creation failed.
        Since:
        3.1
        Departure from OGC/ISO specification:
        This method has been added because OGC 01-009 does not define a factory method for creating such object.