Class GeodeticOperation

All Implemented Interfaces:
Serializable, Formattable, MathTransformProvider, Deprecable, LenientComparable, org.opengis.referencing.IdentifiedObject, org.opengis.referencing.operation.OperationMethod
Direct Known Subclasses:
FranceGeocentricInterpolation, GeocentricAffine, GeocentricToGeographic, GeographicOffsets, GeographicRedimension, GeographicToGeocentric, VerticalOffset

abstract class GeodeticOperation extends AbstractProvider
Base class for providers that perform an operation on geographic or geocentric coordinates. In the geographic case, those operations can have two-dimensional and three-dimensional variants by adding or omitting the ellipsoidal height. Sometimes those variants are explicitly declared in the EPSG database and are implemented in this package as separated operations. Sometimes those variants are specific to Apache SIS and can be fetched only by a call to redimension(int, int).
Since:
0.7
Version:
1.3
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      For cross-version compatibility.
      See Also:
    • redimensioned

      final GeodeticOperation[] redimensioned
      The providers for all combinations between 2D and 3D cases, or null if none. If non-null, then array length shall be 4. Indices are built with following rules:
      • Bit 1: dimension of source coordinates (0 for 2D, 1 for 3D).
      • Bit 0: dimension of target coordinates (0 for 2D, 1 for 3D).
      Do not modify this array after construction, since the same array is shared by many objects and there is no synchronization.
      Historical note: in ISO 19111:2007, the OperationMethod type had two attributes for the number of source and target dimensions. Those attributes have been removed in ISO 19111:2019 revision because not really needed in practice. However, the EPSG database still distinguishes between 2D and 3D variants for some of those operations, so we still need the capability to switch operation methods according to the number of dimensions.
  • Constructor Details

    • GeodeticOperation

      GeodeticOperation(Class<? extends org.opengis.referencing.operation.SingleOperation> operationType, org.opengis.parameter.ParameterDescriptorGroup parameters, Class<? extends org.opengis.referencing.cs.CoordinateSystem> sourceCSType, int sourceDimensions, boolean sourceOnEllipsoid, Class<? extends org.opengis.referencing.cs.CoordinateSystem> targetCSType, int targetDimensions, boolean targetOnEllipsoid, GeodeticOperation[] redimensioned)
      Constructs a math transform provider from a set of parameters. The provider name and identifiers will be the same than the parameter ones. This method expects an array either null or of length 4 with methods of the following dimensions:
      1. 2 → 2 dimensions in redimensioned[0]
      2. 2 → 3 dimensions in redimensioned[1]
      3. 3 → 2 dimensions in redimensioned[2]
      4. 3 → 3 dimensions in redimensioned[3]
      Parameters:
      operationType - base interface of the CoordinateOperation instances that use this method.
      parameters - description of parameters expected by this operation.
      sourceDimensions - number of dimensions in the source CRS of this operation method.
      sourceCSType - base interface of the coordinate system of source coordinates.
      sourceOnEllipsoid - whether the operation needs source ellipsoid axis lengths.
      targetDimensions - number of dimensions in the target CRS of this operation method.
      targetCSType - base interface of the coordinate system of target coordinates.
      targetOnEllipsoid - whether the operation needs target ellipsoid axis lengths.
      redimensioned - providers for all combinations between 2D and 3D cases, or null.
  • Method Details

    • variant3D

      Class<? extends GeodeticOperation> variant3D()
      Returns the three-dimensional variant of this operation method, or null if none. This method needs to be overridden only if the three-dimensional variant is an instance of a different class than this instance.

      This method is not needed on the JDK9 branch.

    • redimension

      @Deprecated public final org.opengis.referencing.operation.OperationMethod redimension(int sourceDimensions, int targetDimensions)
      Deprecated.
      ISO 19111:2019 removed source/target dimensions attributes.
      Returns the elements of the given array at an index computed from the given dimensions.
      Overrides:
      redimension in class DefaultOperationMethod
      Parameters:
      sourceDimensions - the desired number of input dimensions.
      targetDimensions - the desired number of output dimensions.
      Returns:
      the redimensioned operation method, or null if none.
    • inverse

      public AbstractProvider inverse()
      The inverse of GeodeticOperation is usually the same operation with parameter signs inverted.
      Overrides:
      inverse in class AbstractProvider
      Returns:
      this for most GeodeticOperation instances.
      See Also: