Class Geographic3Dto2D

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

public final class Geographic3Dto2D extends GeographicRedimension
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
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      Serial number for inter-operability with different versions.
      See Also:
    • PARAMETERS

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

      private transient org.opengis.referencing.operation.MathTransform transform
      The unique instance, created when first needed.
  • Constructor Details

    • Geographic3Dto2D

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

      private Geographic3Dto2D(GeodeticOperation[] redimensioned)
      Constructs a provider that can be resized.
  • Method Details

    • inverse

      public AbstractProvider inverse()
      Returns the inverse of this operation.
      Overrides:
      inverse in class GeodeticOperation
      Returns:
      this for most GeodeticOperation instances.
      See Also:
    • getMethod

      static AbstractProvider getMethod(org.opengis.parameter.ParameterDescriptorGroup desc)
      Workaround while waiting for JDK 9. After migration to Jigsaw, inverse() should return directly the unique provider instance.
    • 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
      Overrides:
      createMathTransform in class GeographicRedimension
      Parameters:
      factory - ignored (can be null).
      values - ignored.
      Returns:
      the math transform.
      Throws:
      org.opengis.util.FactoryException - should never happen.