org.opengis.spatialschema.geometry
Interface DirectPosition
-
- All Superinterfaces:
- java.lang.Cloneable, Position
@UML(identifier="DirectPosition", specification=ISO_19107) public interface DirectPosition extends Position, Cloneable
Holds the coordinates for a position within some coordinate reference system. SinceDirectPositions, as data types, will often be included in larger objects (such as geometries) that have references toCoordinateReferenceSystem, thegetCoordinateReferenceSystem()method may returnsnullif this particularDirectPositionis included in a larger object with such a reference to a coordinate reference system. In this case, the cordinate reference system is implicitly assumed to take on the value of the containing object'sCoordinateReferenceSystem.- Since:
- GeoAPI 1.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description java.lang.Objectclone()Makes an exact copy of this coordinate.CoordinateReferenceSystemgetCoordinateReferenceSystem()The coordinate reference system in which the coordinate is given.double[]getCoordinates()Returns the sequence of numbers that hold the coordinate of this position in its reference system.intgetDimension()The length of coordinate sequence (the number of entries).doublegetOrdinate(int dimension)Returns the ordinate at the specified dimension.voidsetOrdinate(int dimension, double value)Sets the ordinate value along the specified dimension.-
Methods inherited from interface org.opengis.spatialschema.geometry.geometry.Position
getPosition
-
-
-
-
Method Detail
-
getDimension
@UML(identifier="dimension", obligation=MANDATORY, specification=ISO_19107) int getDimension()
The length of coordinate sequence (the number of entries). This is determined by the coordinate reference system.- Returns:
- The dimensionality of this position.
-
getCoordinates
@UML(identifier="coordinates", obligation=MANDATORY, specification=ISO_19107) double[] getCoordinates()
Returns the sequence of numbers that hold the coordinate of this position in its reference system.- Returns:
- A copy of the coordinates. Changes in the returned array will not be reflected
back in this
DirectPositionobject.
-
getOrdinate
double getOrdinate(int dimension) throws java.lang.IndexOutOfBoundsExceptionReturns the ordinate at the specified dimension.- Parameters:
dimension- The dimension in the range 0 to dimension-1.- Returns:
- The coordinate at the specified dimension.
- Throws:
java.lang.IndexOutOfBoundsException- if the specified dimension is out of bounds.
-
setOrdinate
void setOrdinate(int dimension, double value) throws java.lang.IndexOutOfBoundsExceptionSets the ordinate value along the specified dimension.- Parameters:
dimension- the dimension for the ordinate of interest.value- the ordinate value of interest.- Throws:
java.lang.IndexOutOfBoundsException- if the specified dimension is out of bounds.
-
getCoordinateReferenceSystem
@UML(identifier="coordinateReferenceSystem", obligation=MANDATORY, specification=ISO_19107) CoordinateReferenceSystem getCoordinateReferenceSystem()
The coordinate reference system in which the coordinate is given. May benullif this particularDirectPositionis included in a larger object with such a reference to a coordinate reference system. In this case, the cordinate reference system is implicitly assumed to take on the value of the containing object's coordinate reference system.- Returns:
- The coordinate reference system, or
null.
-
clone
java.lang.Object clone()
Makes an exact copy of this coordinate.- See Also:
Object.clone()
-
-
DataMelt 3.0 © DataMelt by jWork.ORG