Class GeographicToGeocentric
java.lang.Object
org.apache.sis.io.wkt.FormattableObject
org.apache.sis.referencing.AbstractIdentifiedObject
org.apache.sis.referencing.operation.DefaultOperationMethod
org.apache.sis.internal.referencing.provider.AbstractProvider
org.apache.sis.internal.referencing.provider.GeodeticOperation
org.apache.sis.internal.referencing.provider.GeographicToGeocentric
- All Implemented Interfaces:
Serializable,Formattable,MathTransformProvider,Deprecable,LenientComparable,org.opengis.referencing.IdentifiedObject,org.opengis.referencing.operation.OperationMethod
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 Summary
FieldsModifier and TypeFieldDescriptionstatic final org.opengis.parameter.ParameterDescriptor<Integer>An Apache SIS specific parameter for the number of dimensions (2 or 3).static final StringThe OGC name used for this operation method.static final org.opengis.parameter.ParameterDescriptorGroupThe group of all parameters expected by this coordinate operation.private static final longSerial number for inter-operability with different versions.Fields inherited from class org.apache.sis.internal.referencing.provider.GeodeticOperation
redimensionedFields inherited from class org.apache.sis.internal.referencing.provider.AbstractProvider
sourceCSType, sourceOnEllipsoid, targetCSType, targetOnEllipsoidFields inherited from class org.apache.sis.referencing.AbstractIdentifiedObject
DEPRECATED_KEY, LOCALE_KEYFields inherited from interface org.opengis.referencing.IdentifiedObject
ALIAS_KEY, IDENTIFIERS_KEY, NAME_KEY, REMARKS_KEYFields inherited from interface org.opengis.referencing.operation.OperationMethod
FORMULA_KEY -
Constructor Summary
ConstructorsModifierConstructorDescriptionConstructs a provider for the 3-dimensional case.privateGeographicToGeocentric(int sourceDimensions, GeodeticOperation[] redimensioned) Constructs a provider for the given dimensions. -
Method Summary
Modifier and TypeMethodDescription(package private) static org.opengis.referencing.operation.MathTransformcreate(org.opengis.referencing.operation.MathTransformFactory factory, Parameters values) Implementation ofcreateMathTransform(MathTransformFactory, ParameterValueGroup)shared withGeocentricToGeographic.org.opengis.referencing.operation.MathTransformcreateMathTransform(org.opengis.referencing.operation.MathTransformFactory factory, org.opengis.parameter.ParameterValueGroup values) Creates a transform from the specified group of parameter values.inverse()Specifies that the inverse of this operation is a different kind of operation.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.Methods inherited from class org.apache.sis.internal.referencing.provider.GeodeticOperation
redimension, variant3DMethods inherited from class org.apache.sis.internal.referencing.provider.AbstractProvider
addIdentifierAndLegacy, addNameAndLegacy, builder, createLatitude, createLongitude, createMandatoryLatitude, createScale, createShift, createZeroConstant, getOperationType, recoverableExceptionMethods inherited from class org.apache.sis.referencing.operation.DefaultOperationMethod
castOrCopy, computeHashCode, equals, formatTo, getFormula, getInterface, getParameters, getSourceDimensions, getTargetDimensions, redimensionMethods inherited from class org.apache.sis.referencing.AbstractIdentifiedObject
castOrCopy, equals, formatTo, getAlias, getDescription, getIdentifiers, getName, getRemarks, hashCode, isDeprecated, isHeuristicMatchForNameMethods inherited from class org.apache.sis.io.wkt.FormattableObject
print, toString, toString, toWKTMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.opengis.referencing.IdentifiedObject
getAlias, getIdentifiers, getName, getRemarks, toWKT
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDSerial number for inter-operability with different versions.- See Also:
-
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
An Apache SIS specific parameter for the number of dimensions (2 or 3). This parameter is practically the same thanGeocentricAffineBetweenGeographic.DIMENSIONexcept:- 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.
- The code space is
-
PARAMETERS
public static final org.opengis.parameter.ParameterDescriptorGroup PARAMETERSThe group of all parameters expected by this coordinate operation.
-
-
Constructor Details
-
GeographicToGeocentric
public GeographicToGeocentric()Constructs a provider for the 3-dimensional case. -
GeographicToGeocentric
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
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
GeocentricToGeographicclass 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:
resolveAmbiguityin classAbstractProvider- 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, ornullif none.
-
inverse
Specifies that the inverse of this operation is a different kind of operation.- Overrides:
inversein classGeodeticOperation- 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 Implementation ofcreateMathTransform(MathTransformFactory, ParameterValueGroup)shared withGeocentricToGeographic.- Throws:
org.opengis.util.FactoryException
-