Class Molodensky.Ellipsoid
java.lang.Object
org.apache.sis.io.wkt.FormattableObject
org.apache.sis.referencing.AbstractIdentifiedObject
org.apache.sis.referencing.datum.DefaultEllipsoid
org.apache.sis.internal.referencing.provider.Molodensky.Ellipsoid
- All Implemented Interfaces:
Serializable
,Formattable
,Deprecable
,LenientComparable
,org.opengis.referencing.datum.Ellipsoid
,org.opengis.referencing.IdentifiedObject
- Enclosing class:
Molodensky
A temporary ellipsoid used only for passing arguments to the
MolodenskyTransform
constructor.
The intent is to use the Δa and Δf values explicitly specified in the EPSG parameters if available,
or to compute them only if no Δa or Δf values where specified.-
Field Summary
FieldsModifier and TypeFieldDescription(package private) Molodensky.Ellipsoid
The ellipsoid for which Δa and Δf are valid.private double
The EPSG parameter values, or NaN if unspecified.private double
The EPSG parameter values, or NaN if unspecified.Fields inherited from class org.apache.sis.referencing.AbstractIdentifiedObject
DEPRECATED_KEY, LOCALE_KEY
Fields inherited from interface org.opengis.referencing.IdentifiedObject
ALIAS_KEY, IDENTIFIERS_KEY, NAME_KEY, REMARKS_KEY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) void
computeDifferences
(Parameters values) Computes Δa and Δf now if not already done and tries to store the result in the given parameters.double
flatteningDifference
(org.opengis.referencing.datum.Ellipsoid target) Returns Δf as specified in the parameters if possible, or compute it otherwise.double
semiMajorAxisDifference
(org.opengis.referencing.datum.Ellipsoid target) Returns Δa as specified in the parameters if possible, or compute it otherwise.private static void
setIfPresent
(Parameters values, org.opengis.parameter.ParameterDescriptor<Double> parameter, double value, javax.measure.Unit<?> unit) Tries to set the given parameter value.Methods inherited from class org.apache.sis.referencing.datum.DefaultEllipsoid
castOrCopy, computeHashCode, createEllipsoid, createFlattenedSphere, equals, formatTo, getAuthalicRadius, getAxisUnit, getEccentricity, getEccentricitySquared, getInterface, getInverseFlattening, getRadius, getSemiMajorAxis, getSemiMinorAxis, isIvfDefinitive, isSphere
Methods inherited from class org.apache.sis.referencing.AbstractIdentifiedObject
castOrCopy, equals, formatTo, getAlias, getDescription, getIdentifiers, getName, getRemarks, hashCode, isDeprecated, isHeuristicMatchForName
Methods inherited from class org.apache.sis.io.wkt.FormattableObject
print, toString, toString, toWKT
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.opengis.referencing.IdentifiedObject
getAlias, getIdentifiers, getName, getRemarks, toWKT
-
Field Details
-
Δa
private double ΔaThe EPSG parameter values, or NaN if unspecified. -
Δf
private double ΔfThe EPSG parameter values, or NaN if unspecified. -
other
Molodensky.Ellipsoid otherThe ellipsoid for which Δa and Δf are valid.
-
-
Constructor Details
-
Ellipsoid
Creates a new temporary ellipsoid with explicitly provided Δa and Δf values.
-
-
Method Details
-
computeDifferences
Computes Δa and Δf now if not already done and tries to store the result in the given parameters. The parameters are set in order to complete them when the user specified the OGC parameters (axis lengths) and not the EPSG ones (axis and flattening differences). -
setIfPresent
private static void setIfPresent(Parameters values, org.opengis.parameter.ParameterDescriptor<Double> parameter, double value, javax.measure.Unit<?> unit) Tries to set the given parameter value. This method should be invoked only when completing parameters without explicit values. This approach completes the work done inDefaultMathTransformFactory
, which already completed thesrc_semi_major
,src_semi_minor
,tgt_semi_major
andtgt_semi_minor
parameters.- Parameters:
values
- the group in which to set the parameter values.parameter
- descriptor of the parameter to set.value
- the new value.unit
- unit of measurement for the new value.
-
semiMajorAxisDifference
public double semiMajorAxisDifference(org.opengis.referencing.datum.Ellipsoid target) Returns Δa as specified in the parameters if possible, or compute it otherwise.- Overrides:
semiMajorAxisDifference
in classDefaultEllipsoid
- Parameters:
target
- the other ellipsoid from which to get semi-major axis length difference.- Returns:
- (other ellipsoid semi-major axis) - (this ellipsoid semi-major axis).
-
flatteningDifference
public double flatteningDifference(org.opengis.referencing.datum.Ellipsoid target) Returns Δf as specified in the parameters if possible, or compute it otherwise.- Overrides:
flatteningDifference
in classDefaultEllipsoid
- Parameters:
target
- the other ellipsoid from which to get flattening difference.- Returns:
- (other ellipsoid flattening) - (this ellipsoid flattening).
-