Package org.apache.sis.parameter
Class MapProjectionParameters.EarthRadius
java.lang.Object
org.apache.sis.io.wkt.FormattableObject
org.apache.sis.parameter.DefaultParameterValue<Double>
org.apache.sis.parameter.MapProjectionParameters.EarthRadius
- All Implemented Interfaces:
Serializable
,Cloneable
,LenientComparable
,org.opengis.parameter.GeneralParameterValue
,org.opengis.parameter.ParameterValue<Double>
- Enclosing class:
- MapProjectionParameters
The earth radius parameter. This parameter is computed automatically from the
"semi_major"
and "semi_minor"
parameters. When explicitly set, this parameter value is also assigned
to the "semi_major"
and "semi_minor"
axis lengths.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final org.opengis.parameter.ParameterDescriptor<Double>
All names known to Apache SIS for the Earth radius parameter.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
ConstructorsConstructorDescriptionEarthRadius
(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.javax.measure.Unit<?>
getUnit()
Unconditionally returns the unit of the semi-major axis, which is the unit in whichdoubleValue()
performs its computation.getValue()
Getters other than the abovedoubleValue()
delegate to this method.protected void
Invoked when a new parameter value is set.Methods inherited from class org.apache.sis.parameter.DefaultParameterValue
booleanValue, clone, doubleValue, doubleValueList, doubleValueList, equals, equals, formatTo, getDescriptor, 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 Earth radius parameter. This is used in some netCDF files instead ofSEMI_MAJOR
andSEMI_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.
-
-
Constructor Details
-
EarthRadius
EarthRadius(org.opengis.parameter.ParameterValue<?> semiMajor, org.opengis.parameter.ParameterValue<?> semiMinor) Creates a new parameter.
-
-
Method Details
-
setValue
Invoked when a new parameter value is set. This method sets both axis length to the given radius.- 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. Unconditionally computes the authalic radius. If an Earth radius has been explicitly specified, the result will be the same unless the user overwrote it with explicit semi-major or semi-minor axis length.- 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:
-
getUnit
public javax.measure.Unit<?> getUnit()Unconditionally returns the unit of the semi-major axis, which is the unit in whichdoubleValue()
performs its computation.- Specified by:
getUnit
in interfaceorg.opengis.parameter.ParameterValue<Double>
- Overrides:
getUnit
in classDefaultParameterValue<Double>
- Returns:
- the unit of measure, or
null
if none. - 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:
-