Class CoordinateSystemTransform

All Implemented Interfaces:
Parameterized, LenientComparable, org.opengis.referencing.operation.MathTransform
Direct Known Subclasses:
CartesianToPolar, CartesianToSpherical, PolarToCartesian, SphericalToCartesian

abstract class CoordinateSystemTransform extends AbstractMathTransform
Base class of conversions between coordinate systems. Each subclass should have a singleton instance.
Since:
0.7
Version:
1.1
  • Field Details

    • dimension

      private final int dimension
      Number of input and output dimensions.
    • method

      private final transient org.opengis.referencing.operation.OperationMethod method
      An operation method that describe this coordinate system conversion. This is used for providing a value in DefaultMathTransformFactory.getLastMethodUsed().
    • method3D

      private final transient org.opengis.referencing.operation.OperationMethod method3D
      The method augmented with one pass through dimension. May be the same instance than method if that method is already 3D.
      Note: if method is "Polar to Cartesian", then method3D is "Cylindrical to Cartesian".
      This method is used for CoordinateOperation WKT formatting. Contrarily to method, this method3D is never used for MathTransform WKT. Instead, the latter case is represented by a concatenation of method with a pass-through.
    • context

      final transient ContextualParameters context
      An empty contextual parameter, used only for representing conversion from degrees to radians.
    • complete

      private transient volatile org.opengis.referencing.operation.MathTransform complete
      The complete transform, including conversion between degrees and radians.
      See Also:
    • passthrough

      private transient volatile org.opengis.referencing.operation.MathTransform passthrough
      The complete transform in a PassThroughTransform with a 1 trailing coordinate. This is used for supporting the cylindrical case on top the polar case.
      See Also:
  • Constructor Details

  • Method Details

    • method

      private static org.opengis.referencing.operation.OperationMethod method(String name)
      Creates an operation method of the given name.
    • completeTransform

      final org.opengis.referencing.operation.MathTransform completeTransform(org.opengis.referencing.operation.MathTransformFactory factory) throws org.opengis.util.FactoryException
      Returns the complete transform, including conversion between degrees and radians units.
      Throws:
      org.opengis.util.FactoryException
    • passthrough

      final org.opengis.referencing.operation.MathTransform passthrough(org.opengis.referencing.operation.MathTransformFactory factory) throws org.opengis.util.FactoryException
      Returns the cylindrical, including conversion between degrees and radians units. This method is legal only for PolarToCartesian or CartesianToPolar.
      Throws:
      org.opengis.util.FactoryException
    • getSourceDimensions

      public final int getSourceDimensions()
      Returns the number of dimensions in the source coordinate tuples. Shall be equal to getSourceCS().getDimension().
      Specified by:
      getSourceDimensions in interface org.opengis.referencing.operation.MathTransform
      Specified by:
      getSourceDimensions in class AbstractMathTransform
      Returns:
      the number of dimensions of input points.
      See Also:
    • getTargetDimensions

      public final int getTargetDimensions()
      Returns the number of dimensions in the target coordinate tuples. Shall be equal to getTargetCS().getDimension().
      Specified by:
      getTargetDimensions in interface org.opengis.referencing.operation.MathTransform
      Specified by:
      getTargetDimensions in class AbstractMathTransform
      Returns:
      the number of dimensions of output points.
      See Also:
    • getParameterValues

      public final org.opengis.parameter.ParameterValueGroup getParameterValues()
      Returns the empty set of parameter values.
      Specified by:
      getParameterValues in interface Parameterized
      Overrides:
      getParameterValues in class AbstractMathTransform
      Returns:
      the parameter values for this math transform, or null if unspecified. Note that those parameters may be normalized (e.g. represent a transformation of an ellipsoid of semi-major axis length of 1).
      See Also:
    • getContextualParameters

      protected final ContextualParameters getContextualParameters()
      Returns the contextual parameters. This is used for telling to the Well Known Text (WKT) formatter that this CoordinateSystemTransform transform is usually preceeded or followed by a conversion between degree and radian units of measurement.
      Overrides:
      getContextualParameters in class AbstractMathTransform
      Returns:
      the parameter values for the sequence of normalizethisdenormalize transforms, or null if unspecified. Callers should not modify the returned parameters, since modifications (if allowed) will generally not be reflected back in this MathTransform.
    • create

      static org.opengis.referencing.operation.MathTransform create(org.opengis.referencing.operation.MathTransformFactory factory, org.opengis.referencing.cs.CoordinateSystem source, org.opengis.referencing.cs.CoordinateSystem target, ThreadLocal<org.opengis.referencing.operation.OperationMethod> lastMethod) throws org.opengis.util.FactoryException
      Implementation of DefaultMathTransformFactory.createCoordinateSystemChange(CoordinateSystem, CoordinateSystem, Ellipsoid), defined here for reducing the DefaultMathTransformFactory weight in the common case where the conversions handled by this class are not needed.
      Throws:
      org.opengis.util.FactoryException