Package org.opengis.geometry.coordinate
Interface Position
-
- All Known Subinterfaces:
DirectPosition
@Classifier(UNION) @UML(identifier="GM_Position", specification=ISO_19107) public interface Position
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 tuple (variant direct) or indirectly as a point (variant indirect).- Since:
- 1.0
Departure from OGC/ISO specification:
ISO 19107 definesPositionas aunionofDirectPositionandPointbut unions are not allowed in Java. GeoAPI definesPositionas the base interface of both types so the two conditional accessor methods,getPoint()andgetDirectPosition(), can be replaced by aninstanceofcheck. However, thegetDirectPosition()has been retained with different semantics, conceptually returning aDirectPositionat 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 Type Method Description DirectPositiongetDirectPosition()Returns the direct position.
-
-
-
Method Detail
-
getDirectPosition
@UML(identifier="direct", obligation=CONDITIONAL, specification=ISO_19107) DirectPosition getDirectPosition()
Returns the direct position. This method shall never returnnull, but may returnthisif invoked on an object which is already aDirectPositioninstance.- Returns:
- the direct position (may be
this).
-
-