Class GeographicToGeocentric

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

public final class GeographicToGeocentric extends GeodeticOperation
The provider for "Geographic/geocentric conversions" (EPSG:9602). This provider creates transforms from geographic to geocentric coordinate reference systems.
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:
    • NAME

      public static final String NAME
      The OGC name used for this operation method. The OGC name is preferred to the EPSG name in Apache SIS implementation because it allows to distinguish between the forward and the inverse conversion.
      See Also:
    • DIMENSION

      public static final org.opengis.parameter.ParameterDescriptor<Integer> DIMENSION
      An Apache SIS specific parameter for the number of dimensions (2 or 3). This parameter is practically the same than GeocentricAffineBetweenGeographic.DIMENSION except:
      • The code space is "SIS" instead of "OGC" since this parameter is not defined in OGC 01-009.
      • The default number of dimensions is 3 instead of unspecified.
      See Also:
    • PARAMETERS

      public static final org.opengis.parameter.ParameterDescriptorGroup PARAMETERS
      The group of all parameters expected by this coordinate operation.
  • Constructor Details

    • GeographicToGeocentric

      public GeographicToGeocentric()
      Constructs a provider for the 3-dimensional case.
    • GeographicToGeocentric

      private GeographicToGeocentric(int sourceDimensions, GeodeticOperation[] redimensioned)
      Constructs a provider for the given dimensions.
      Parameters:
      sourceDimensions - number of dimensions in the source CRS of this operation method.
      redimensioned - providers for all combinations between 2D and 3D cases.
  • Method Details

    • resolveAmbiguity

      public String resolveAmbiguity(DefaultMathTransformFactory.Context context)
      If the user asked for the "Geographic/geocentric conversions" operation but the parameter types suggest that (s)he intended to convert in the opposite direction, return the name of operation method to use. We need this check because EPSG defines a single operation method for both "Ellipsoid_To_Geocentric" and "Geocentric_To_Ellipsoid" methods.

      Note: we do not define similar method in GeocentricToGeographic class because the only way to obtain that operation method is to ask explicitly for "Geocentric_To_Ellipsoid" operation. The ambiguity that we try to resolve here exists only if the user asked for the EPSG:9602 operation, which is defined only in this class.

      Overrides:
      resolveAmbiguity in class AbstractProvider
      Parameters:
      context - the potentially ambiguous context.
      Returns:
      "Geocentric_To_Ellipsoid" if the user apparently wanted to get the inverse of this "Ellipsoid_To_Geocentric" operation, or null if none.
    • inverse

      public AbstractProvider inverse()
      Specifies that the inverse of this operation is a different kind of operation.
      Overrides:
      inverse in class GeodeticOperation
      Returns:
      null.
      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
      Creates a transform from the specified group of parameter values.
      Parameters:
      factory - the factory to use for creating the transform.
      values - the parameter values that define the transform to create.
      Returns:
      the conversion from geographic to geocentric coordinates.
      Throws:
      org.opengis.util.FactoryException - if an error occurred while creating a transform.
    • create

      static org.opengis.referencing.operation.MathTransform create(org.opengis.referencing.operation.MathTransformFactory factory, Parameters values) throws org.opengis.util.FactoryException
      Throws:
      org.opengis.util.FactoryException