Package org.apache.sis.parameter
Class MapProjectionParameters.InverseFlattening
java.lang.Object
org.apache.sis.io.wkt.FormattableObject
org.apache.sis.parameter.DefaultParameterValue<Double>
org.apache.sis.parameter.MapProjectionParameters.InverseFlattening
- All Implemented Interfaces:
Serializable
,Cloneable
,LenientComparable
,org.opengis.parameter.GeneralParameterValue
,org.opengis.parameter.ParameterValue<Double>
- Enclosing class:
- MapProjectionParameters
The inverse flattening parameter. This parameter is computed automatically from the
"semi_major"
and "semi_minor"
parameters. When explicitly set, this parameter value is used for computing the
semi-minor axis length.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate double
The declared inverse flattening values, together with a snapshot of axis lengths at the time the inverse flattening has been set.private double
The declared inverse flattening values, together with a snapshot of axis lengths at the time the inverse flattening has been set.(package private) static final org.opengis.parameter.ParameterDescriptor<Double>
All names known to Apache SIS for the inverse flattening parameter.private double
The declared inverse flattening values, together with a snapshot of axis lengths at the time the inverse flattening has been set.private final org.opengis.parameter.ParameterValue<?>
The parameters for the semi-major and semi-minor axis length.private final org.opengis.parameter.ParameterValue<?>
The parameters for the semi-major and semi-minor axis length.private static final long
For cross-version compatibility.Fields inherited from class org.apache.sis.parameter.DefaultParameterValue
unit, value
-
Constructor Summary
ConstructorsConstructorDescriptionInverseFlattening
(org.opengis.parameter.ParameterValue<?> semiMajor, org.opengis.parameter.ParameterValue<?> semiMinor) Creates a new parameter. -
Method Summary
Modifier and TypeMethodDescriptiondouble
Invoked when the parameter value is requested.getValue()
Getters other than the abovedoubleValue()
delegate to this method.(package private) void
Declares that the inverse flattening factor is not definitive.(package private) boolean
Returnstrue
if the inverse flattening factor has been explicitly specified and seems to still valid.protected void
Invoked when a new parameter value is set.Helper method forDESCRIPTOR
constructions.Methods inherited from class org.apache.sis.parameter.DefaultParameterValue
booleanValue, clone, doubleValue, doubleValueList, doubleValueList, equals, equals, formatTo, getDescriptor, getUnit, hashCode, intValue, intValueList, setDescriptor, setValue, setValue, setValue, setValue, setValue, setValue, stringValue, unmodifiable, validate, valueFile
Methods inherited from class org.apache.sis.io.wkt.FormattableObject
print, toString, toString, toWKT
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDFor cross-version compatibility. Actually instances of this class are not expected to be serialized, but we try to be a bit safer here.- See Also:
-
DESCRIPTOR
All names known to Apache SIS for the inverse flattening parameter. This is used in some netCDF files instead ofSEMI_MINOR
. This is not a standard parameter. -
semiMajor
private final org.opengis.parameter.ParameterValue<?> semiMajorThe parameters for the semi-major and semi-minor axis length. -
semiMinor
private final org.opengis.parameter.ParameterValue<?> semiMinorThe parameters for the semi-major and semi-minor axis length. -
inverseFlattening
private double inverseFlatteningThe declared inverse flattening values, together with a snapshot of axis lengths at the time the inverse flattening has been set. -
a
private double aThe declared inverse flattening values, together with a snapshot of axis lengths at the time the inverse flattening has been set. -
b
private double bThe declared inverse flattening values, together with a snapshot of axis lengths at the time the inverse flattening has been set.
-
-
Constructor Details
-
InverseFlattening
InverseFlattening(org.opengis.parameter.ParameterValue<?> semiMajor, org.opengis.parameter.ParameterValue<?> semiMinor) Creates a new parameter.
-
-
Method Details
-
toMap
Helper method forDESCRIPTOR
constructions. -
invalidate
void invalidate()Declares that the inverse flattening factor is not definitive. We use the fact that the==
operator givesfalse
if a value is NaN. -
isIvfDefinitive
boolean isIvfDefinitive()Returnstrue
if the inverse flattening factor has been explicitly specified and seems to still valid. -
setValue
Invoked when a new parameter value is set. This method computes the semi-minor axis length from the given value.- Overrides:
setValue
in classDefaultParameterValue<Double>
- Parameters:
value
- the parameter value, ornull
to restore the default.unit
- the unit associated to the new parameter value, ornull
.- See Also:
-
doubleValue
public double doubleValue()Invoked when the parameter value is requested. Computes the inverse flattening factor from the axis lengths if the currently stored value does not seem to be valid anymore.- Specified by:
doubleValue
in interfaceorg.opengis.parameter.ParameterValue<Double>
- Overrides:
doubleValue
in classDefaultParameterValue<Double>
- Returns:
- the numeric value represented by this parameter after conversion to type
double
. This method returnsDouble.NaN
only if such "value" has been explicitly set. - See Also:
-
getValue
Getters other than the abovedoubleValue()
delegate to this method.- Specified by:
getValue
in interfaceorg.opengis.parameter.ParameterValue<Double>
- Overrides:
getValue
in classDefaultParameterValue<Double>
- Returns:
- the parameter value as an object, or
null
if no value has been set and there is no default value. - See Also:
-