- All Known Subinterfaces:
DirectPosition
A type consisting of either a direct position or of a
point from which a direct position
shall be obtained. The use of this data type allows the identification of a position
either directly as a coordinate (variant direct) or indirectly as a point
(variant indirect).
- Since:
- 1.0
- Departure from OGC/ISO abstract specification:
Departure due to constraint of the Java language
ISO 19107 definesPosition
as aunion
ofDirectPosition
andPoint
but unions are not allowed in Java. GeoAPI definesPosition
as the base interface of both types so the two conditional accessor methods,getPoint()
andgetDirectPosition()
, can be replaced by aninstanceof
check. However, thegetDirectPosition()
has been retained with different semantics, conceptually returning aDirectPosition
at the same location. The conditionality has also been changed to mandatory since all three types conceptually have a well defined location.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the direct position.
-
Method Details
-
getDirectPosition
@UML(identifier="direct", obligation=CONDITIONAL, specification=ISO_19107) DirectPosition getDirectPosition()Returns the direct position. This method shall never returnsnull
, but may returnsthis
if invoked on an object which is already aDirectPosition
instance.- Returns:
- The direct position (may be
this
). - Since:
- 2.2
-