Class DefaultConversion

    • Constructor Detail

      • DefaultConversion

        public DefaultConversion​(Map<String,​?> properties,
                                 CoordinateReferenceSystem sourceCRS,
                                 CoordinateReferenceSystem targetCRS,
                                 CoordinateReferenceSystem interpolationCRS,
                                 OperationMethod method,
                                 MathTransform transform)
        Creates a coordinate conversion from the given properties. The properties given in argument follow the same rules than for the super-class constructor. The following table is a reminder of main (not all) properties:
        Recognized properties (non exhaustive list)
        Property name Value type Returned by
        "name" Identifier or String AbstractIdentifiedObject.getName()
        "identifiers" Identifier (optionally as array) AbstractIdentifiedObject.getIdentifiers()
        "domainOfValidity" Extent AbstractCoordinateOperation.getDomainOfValidity()
        Relationship between datum
        By definition, coordinate conversions do not change the datum. Consequently the given source­CRS and target­CRS should use the same datum. If the datum is not the same, then the coordinate operation should probably be a transformation instead. However Apache SIS does not enforce that condition, but we encourage users to follow it. The reason why SIS is tolerant is because some gray areas may exist about whether an operation should be considered as a conversion or a transformation.
        Example: converting time instants from a temporal CRS using the January 1st, 1950 epoch to another temporal CRS using the January 1st, 1970 epoch is a datum change, since the epoch is part of temporal datum definition. However such operation does not have all the accuracy issues of transformations between geodetic datum (empirically determined, over-determined systems, stochastic nature of the parameters). Consequently some users may consider sufficient to represent temporal epoch changes as conversions instead than transformations.
        Note that while Apache SIS accepts to construct Default­Conversion instances with different source and target datum, it does not accept to use such instances for derived CRS construction.
        Parameters:
        properties - the properties to be given to the identified object.
        source­CRS - the source CRS.
        target­CRS - the target CRS, which shall use a datum equals (ignoring metadata) to the source CRS datum.
        interpolation­CRS - 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.
      • DefaultConversion

        public DefaultConversion​(Map<String,​?> properties,
                                 OperationMethod method,
                                 MathTransform transform,
                                 ParameterValueGroup parameters)
        Creates a defining conversion from the given transform and/or parameters. This conversion has no source and target CRS since those elements are usually unknown at defining conversion construction time. The source and target CRS will become known later, at the Derived CRS or Projected CRS construction time.

        The properties map given in argument follows the same rules than for the above constructor.

        Transform and parameters arguments
        At least one of the transform or parameters argument must be non-null. If the caller supplies a transform argument, then it shall be a transform expecting normalized input coordinates and producing normalized output coordinates. See Axes­Convention for more information about what Apache SIS means by "normalized".

        If the caller can not yet supply a Math­Transform, then (s)he shall supply the parameter values needed for creating that transform, with the possible omission of "semi_major" and "semi_minor" values. The semi-major and semi-minor parameter values will be set automatically when the specialize(…) method will be invoked.

        If both the transform and parameters arguments are non-null, then the later should describe the parameters used for creating the transform. Those parameters will be stored for information purpose and can be given back by the Single­Operation​.get­Parameter­Values() method.

        Parameters:
        properties - the properties to be given to the identified object.
        method - the operation method.
        transform - transform from positions in the source CRS to positions in the target CRS, or null.
        parameters - the transform parameter values, or null.
        See Also:
        Default­Math­Transform­Factory​.swap­And­Scale­Axes(Math­Transform, Default­Math­Transform­Factory​.Context)
      • DefaultConversion

        protected DefaultConversion​(Conversion operation)
        Creates a new coordinate operation with the same values than the specified one. This copy constructor provides a way to convert an arbitrary implementation into a SIS one or a user-defined one (as a subclass), usually in order to leverage some implementation-specific API.

        This constructor performs a shallow copy, i.e. the properties are not cloned.

        Parameters:
        operation - the coordinate operation to copy.
        See Also:
        cast­Or­Copy(Conversion)