Class Molodensky
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.GeocentricAffine
org.apache.sis.internal.referencing.provider.GeocentricAffineBetweenGeographic
org.apache.sis.internal.referencing.provider.Molodensky
- All Implemented Interfaces:
Serializable,Formattable,MathTransformProvider,Deprecable,LenientComparable,org.opengis.referencing.IdentifiedObject,org.opengis.referencing.operation.OperationMethod
The provider for "Molodensky transformation" (EPSG:9604).
This provider constructs transforms between two geographic reference systems without passing though a geocentric one.
This class nevertheless extends
GeocentricAffineBetweenGeographic because it is an approximation of
GeocentricTranslation3D.
The translation terms (dx, dy and dz) are common to all authorities. But remaining parameters are specified in different ways depending on the authority:
- EPSG defines "Semi-major axis length difference" and "Flattening difference" parameters.
- OGC rather defines "
src_semi_major", "src_semi_minor", "tgt_semi_major", "tgt_semi_minor" and "dim" parameters.
- Since:
- 0.7
- Version:
- 1.3
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final classA temporary ellipsoid used only for passing arguments to theMolodenskyTransformconstructor.Nested classes/interfaces inherited from class org.apache.sis.internal.referencing.provider.GeocentricAffine
GeocentricAffine.Type -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final org.opengis.parameter.ParameterDescriptor<Double>The operation parameter descriptor for the Semi-major axis length difference optional parameter value.static final org.opengis.parameter.ParameterDescriptor<Double>The operation parameter descriptor for the Flattening difference optional parameter value.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.GeocentricAffineBetweenGeographic
DIMENSION, SRC_SEMI_MAJOR, SRC_SEMI_MINOR, TGT_SEMI_MAJOR, TGT_SEMI_MINORFields inherited from class org.apache.sis.internal.referencing.provider.GeocentricAffine
DS, RX, RY, RZ, TX, TY, TZFields 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 new provider.privateMolodensky(int sourceDimensions, int targetDimensions, GeodeticOperation[] redimensioned) Constructs a provider for the given dimensions. -
Method Summary
Modifier and TypeMethodDescriptionprivate static doubleconditional(Parameters values, org.opengis.parameter.ParameterDescriptor<Double> parameter, double condition) Returns the value of the given parameter as a mandatory parameter ifconditionis NaN, or an optional parameter otherwise.(package private) static org.opengis.referencing.operation.MathTransformcreateMathTransform(org.opengis.referencing.operation.MathTransformFactory factory, Parameters values, int sourceDimensions, int targetDimensions, boolean isAbridged) Creates a (potentially abridged) Molodensky transform from the specified group of parameter values.org.opengis.referencing.operation.MathTransformcreateMathTransform(org.opengis.referencing.operation.MathTransformFactory factory, org.opengis.parameter.ParameterValueGroup values) Creates a Molodensky transform from the specified group of parameter values.static org.opengis.parameter.ParameterDescriptorGroupinternal()Creates a descriptor for the internal parameters ofMolodenskyTransform.private static doubleoptional(Parameters values, org.opengis.parameter.ParameterDescriptor<Double> parameter) Returns the value of the given parameter, or NaN if undefined.Methods inherited from class org.apache.sis.internal.referencing.provider.GeocentricAffine
asDatumShift, createParametersMethods inherited from class org.apache.sis.internal.referencing.provider.GeodeticOperation
inverse, redimension, variant3DMethods inherited from class org.apache.sis.internal.referencing.provider.AbstractProvider
addIdentifierAndLegacy, addNameAndLegacy, builder, createLatitude, createLongitude, createMandatoryLatitude, createScale, createShift, createZeroConstant, getOperationType, recoverableException, resolveAmbiguityMethods 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:
-
AXIS_LENGTH_DIFFERENCE
The operation parameter descriptor for the Semi-major axis length difference optional parameter value. This parameter is defined by the EPSG database and can be used in replacement ofGeocentricAffineBetweenGeographic.TGT_SEMI_MAJOR. Units are metres.
Notes:Parameter names EPSG: Semi-major axis length difference - No default value
-
FLATTENING_DIFFERENCE
The operation parameter descriptor for the Flattening difference optional parameter value. This parameter is defined by the EPSG database and can be used in replacement ofGeocentricAffineBetweenGeographic.TGT_SEMI_MINOR. Valid values range from -1 to +1, dimensionless.
Notes:Parameter names EPSG: Flattening difference - Value domain: [-1.0 … 1.0]
- No default value
-
PARAMETERS
public static final org.opengis.parameter.ParameterDescriptorGroup PARAMETERSThe group of all parameters expected by this coordinate operation.
-
-
Constructor Details
-
Molodensky
public Molodensky()Constructs a new provider. -
Molodensky
Constructs a provider for the given dimensions.- Parameters:
sourceDimensions- number of dimensions in the source CRS of this operation method.targetDimensions- number of dimensions in the target CRS of this operation method.redimensioned- providers for all combinations between 2D and 3D cases.
-
-
Method Details
-
internal
Creates a descriptor for the internal parameters ofMolodenskyTransform. This is similar to the standard parameters except that the redundant target axes lengths are omitted.- Returns:
- internal parameter descriptor.
-
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 Molodensky transform from the specified group of parameter values.- Specified by:
createMathTransformin interfaceMathTransformProvider- Overrides:
createMathTransformin classGeocentricAffineBetweenGeographic- Parameters:
factory- the factory to use for creating concatenated transforms.values- the group of parameter values.- Returns:
- the created Molodensky transform.
- Throws:
org.opengis.util.FactoryException- if a transform cannot be created.
-
createMathTransform
static org.opengis.referencing.operation.MathTransform createMathTransform(org.opengis.referencing.operation.MathTransformFactory factory, Parameters values, int sourceDimensions, int targetDimensions, boolean isAbridged) throws org.opengis.util.FactoryException Creates a (potentially abridged) Molodensky transform from the specified group of parameter values. The specified number of dimensions are default values; they may be overridden by user parameters.- Parameters:
factory- the factory to use for creating concatenated transforms.values- the group of parameter values specified by the users.sourceDimensions- number of source dimensions (2 or 3) of the operation method.targetDimensions- number of target dimensions (2 or 3) of the operation method.isAbridged-truefor the abridged form.- Returns:
- the created (abridged) Molodensky transform.
- Throws:
org.opengis.util.FactoryException- if a transform cannot be created.
-
optional
private static double optional(Parameters values, org.opengis.parameter.ParameterDescriptor<Double> parameter) Returns the value of the given parameter, or NaN if undefined. -
conditional
private static double conditional(Parameters values, org.opengis.parameter.ParameterDescriptor<Double> parameter, double condition) Returns the value of the given parameter as a mandatory parameter ifconditionis NaN, or an optional parameter otherwise.
-