Class SecondDefiningParameter
java.lang.Object
org.apache.sis.internal.jaxb.referencing.SecondDefiningParameter
Stores the second defining parameter of an
Ellipsoid
.
The purpose of this class is to allow JAXB to handle a second defining parameter,
according to the kind of ellipsoid we are facing to.- Since:
- 0.4
- Version:
- 0.8
-
Field Summary
FieldsModifier and TypeFieldDescriptionWhether the ellipsoid is a sphere, ornull
if unspecified.The measure, which is either the polar radius or the inverse of the flattening value.Nested parameter, for JAXB purpose. -
Constructor Summary
ConstructorsConstructorDescriptionJAXB mandatory empty constructor.SecondDefiningParameter
(org.opengis.referencing.datum.Ellipsoid ellipsoid, boolean nested) Stores the semi-minor axis or the inverse of the flattening value. -
Method Summary
Modifier and TypeMethodDescriptionReturns the inverse of the flattening value as a measurement.Returns the semi-minor axis value as a measurement.boolean
Returnstrue
if the measure is the inverse of the flattening value.void
setInverseFlattening
(Measure measure) Sets the inverse of the flattening value.void
setSemiMinorAxis
(Measure measure) Sets the semi-minor axis value.
-
Field Details
-
secondDefiningParameter
Nested parameter, for JAXB purpose. This is used for marshalling XML like below: -
isSphere
Whether the ellipsoid is a sphere, ornull
if unspecified. If this value istrue
, then the XML shall be marshalled like below:- Since:
- 0.8
-
measure
The measure, which is either the polar radius or the inverse of the flattening value. We distinguish those two cases by the unit: if the measure is the inverse flattening, then the unit must beUnits.UNITY
.This value should be
null
ifisSphere
istrue
.- See Also:
-
-
Constructor Details
-
SecondDefiningParameter
public SecondDefiningParameter()JAXB mandatory empty constructor. -
SecondDefiningParameter
public SecondDefiningParameter(org.opengis.referencing.datum.Ellipsoid ellipsoid, boolean nested) Stores the semi-minor axis or the inverse of the flattening value.- Parameters:
ellipsoid
- the ellipsoid from which to get the semi-minor or inverse flattening value.nested
-true
if the element should be nested in another XML type.
-
-
Method Details
-
isIvfDefinitive
public boolean isIvfDefinitive()Returnstrue
if the measure is the inverse of the flattening value.- Returns:
true
if the measure is the inverse of the flattening value.
-
getSemiMinorAxis
Returns the semi-minor axis value as a measurement.- Returns:
- the measure of the semi-minor axis.
-
setSemiMinorAxis
Sets the semi-minor axis value. This is invoked by JAXB for unmarshalling. The unit of measurement (if any) shall be linear, but we do not verify that now. This will be verified byDefaultEllipsoid.setSecondDefiningParameter(…)
.- Parameters:
measure
- the semi-minor axis value.
-
getInverseFlattening
Returns the inverse of the flattening value as a measurement. Note: The unit of this measurement is dimensionless.- Returns:
- the inverse of the flattening value as a measurement.
-
setInverseFlattening
Sets the inverse of the flattening value. This is invoked by JAXB for unmarshalling.Note that some GML wrongly assign the "m" unit to this measure, which is wrong. This method overwrite the unit with a dimensionless one. This is required anyway in order to distinguish between the two cases.
- Parameters:
measure
- the inverse flattening value.
-