Package org.apache.sis.io.wkt
Class VerticalInfo
java.lang.Object
org.apache.sis.io.wkt.VerticalInfo
Stores temporary information needed for completing the construction of an
DefaultVerticalExtent instance.
WKT of vertical extents looks like:
But DefaultVerticalExtent has no unit property. Instead, DefaultVerticalExtent has a
verticalCRS property. The WKT specification said that heights are positive toward up and relative to
an unspecified mean sea level, but we will try to use the parsed vertical CRS instance if we find a suitable
one (i.e. one that defines gravity-related heights or depths), on the assumption that the vertical extent is
likely to be defined in the same vertical CRS.
This class can be understood as the converse of
Extents.getVerticalRange(org.opengis.metadata.extent.Extent)
- Since:
- 0.6
- Version:
- 0.6
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate org.opengis.referencing.crs.VerticalCRSIf a vertical CRS could be used pending only a change of units, that CRS.private final DefaultVerticalExtentThe vertical extent pending completion.private VerticalInfoThe next instance to resolve.(package private) final javax.measure.Unit<javax.measure.quantity.Length>The unit specified in theVERTICALEXTENTWKT element. -
Constructor Summary
ConstructorsConstructorDescriptionVerticalInfo(VerticalInfo next, DefaultExtent extents, double minimum, double maximum, javax.measure.Unit<javax.measure.quantity.Length> unit) Adds to the chained list a newDefaultVerticalExtentinstance pending completion. -
Method Summary
Modifier and TypeMethodDescription(package private) final VerticalInfocomplete(org.opengis.referencing.crs.CRSFactory crsFactory, org.opengis.referencing.cs.CSFactory csFactory) Completes the extent with a new CRS using the units specified at construction time.properties(Object name) Convenience method for creating the map of properties to give to the factory method.(package private) final VerticalInforesolve(org.opengis.referencing.crs.VerticalCRS crs) If the pendingDefaultVerticalExtentcan use the given CRS, completes the extent now.private VerticalInforesolve(org.opengis.referencing.crs.VerticalCRS crs, org.opengis.referencing.cs.CoordinateSystemAxis axis) Implementation ofresolve(VerticalCRS, CoordinateSystemAxis)to be invoked recursively, after we checked the datum type and fetched the axis once for all.
-
Field Details
-
next
The next instance to resolve. This form a chained list. -
extent
The vertical extent pending completion. -
unit
final javax.measure.Unit<javax.measure.quantity.Length> unitThe unit specified in theVERTICALEXTENTWKT element. -
compatibleCRS
private org.opengis.referencing.crs.VerticalCRS compatibleCRSIf a vertical CRS could be used pending only a change of units, that CRS. Otherwisenull.
-
-
Constructor Details
-
VerticalInfo
VerticalInfo(VerticalInfo next, DefaultExtent extents, double minimum, double maximum, javax.measure.Unit<javax.measure.quantity.Length> unit) Adds to the chained list a newDefaultVerticalExtentinstance pending completion.- Parameters:
next- the existingVerticalInfoinstance. Will become the next instance to process afterthisin a chain ofVerticalInfo.extents- where to add the vertical extent.unit- the unit to assign to theextent. Cannot be null.
-
-
Method Details
-
resolve
If the pendingDefaultVerticalExtentcan use the given CRS, completes the extent now. This method invokesDefaultVerticalExtent.setVerticalCRS(VerticalCRS)with the given CRS if:- datum type is
VerticalDatumType.GEOIDAL, - increasing height values are up, and
- axis unit of measurement is the given linear unit.
VerticalInfoinstances in the chained list.- Returns:
- the new head of the chained list (may be
this), ornullif the list became empty as a result of this operation.
- datum type is
-
resolve
private VerticalInfo resolve(org.opengis.referencing.crs.VerticalCRS crs, org.opengis.referencing.cs.CoordinateSystemAxis axis) Implementation ofresolve(VerticalCRS, CoordinateSystemAxis)to be invoked recursively, after we checked the datum type and fetched the axis once for all. -
complete
final VerticalInfo complete(org.opengis.referencing.crs.CRSFactory crsFactory, org.opengis.referencing.cs.CSFactory csFactory) throws org.opengis.util.FactoryException Completes the extent with a new CRS using the units specified at construction time. The CRS created by this method is implementation-dependent. The only guarantees are:- datum type is
VerticalDatumType.GEOIDAL, - increasing height values are up, and
- axis unit of measurement is the given linear unit.
this.- Throws:
org.opengis.util.FactoryException
- datum type is
-
properties
Convenience method for creating the map of properties to give to the factory method.
-