Class Geographic3Dto2D

All Implemented Interfaces:
Serializable, Formattable, MathTransformProvider, Deprecable, LenientComparable, org.opengis.referencing.IdentifiedObject, org.opengis.referencing.operation.OperationMethod

public final class Geographic3Dto2D extends AbstractProvider
The provider for "Geographic 3D to 2D conversion" (EPSG:9659). This is a trivial operation that just drop the height in a geographic coordinate. The inverse operation arbitrarily sets the ellipsoidal height to zero.
Since:
0.7
Version:
1.3
Author:
Martin Desruisseaux (Geomatys)
See Also:
  • Field Details

    • PARAMETERS

      public static final org.opengis.parameter.ParameterDescriptorGroup PARAMETERS
      The group of all parameters expected by this coordinate operation (in this case, none).
  • Constructor Details

    • Geographic3Dto2D

      public Geographic3Dto2D()
      Constructs a provider with default parameters.
  • Method Details

    • inverse

      public AbstractProvider inverse()
      Returns the inverse of this operation.
      Returns:
      this for most GeodeticOperation instances.
      See Also:
    • createMathTransform

      public org.opengis.referencing.operation.MathTransform createMathTransform(org.opengis.referencing.operation.MathTransformFactory factory, org.opengis.parameter.ParameterValueGroup values) throws org.opengis.util.FactoryException
      Returns the transform.
      Implementation note: creating a transform that drop a dimension is trivial. We even have a helper method for that: Matrices.createDimensionSelect(int, int[]) The difficulty is that the inverse of that transform will set the height to NaN, while we want zero. The trick is to first create the transform for the inverse transform with the zero that we want, then get the inverse of that inverse transform. The transform that we get will remember where it come from (its inverse).

      This work with SIS implementation, but is not guaranteed to work with other implementations. For that reason, this method does not use the given factory.

      Specified by:
      createMathTransform in interface MathTransformProvider
      Parameters:
      factory - ignored (can be null).
      values - ignored.
      Returns:
      the math transform.
      Throws:
      org.opengis.util.FactoryException - should never happen.
    • 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.