oracle.sdoapi.geom
Interface LineString
- All Superinterfaces:
- java.lang.Cloneable, Curve, CurveString, Geometry, java.io.Serializable
- public interface LineString
- extends CurveString
LineString is an interface that represents an OGC-specified line string. A
line string is a curve string with linear interpolation between points. Each
consecutive pair of points defines a line segment.
Method Summary |
double[] |
getCoordArray()
Gets the coordinate array of this line string. |
int |
getCoordArray(double[] coordArray,
int pointOffset,
int numPoints)
Gets the coordinate array of this line string. |
int |
getOrdArray(double[] ordArray,
int i,
int pointOffset,
int numPoints)
Gets the i-th ordinate array of this line string. |
double[] |
getOrdArray(int i)
Gets the i-th ordinate array of this line string. |
Methods inherited from interface oracle.sdoapi.geom.Geometry |
clone, getAllIsolatedPoints, getAllSegments, getCoordinateDimension, getDimensionality, getEnvelope, getGeometryType, getLabelPoint, getLabelPoint, getSpatialReference, isEmpty, isSimple, isValid, linearize |
getCoordArray
public double[] getCoordArray()
- Gets the coordinate array of this line string. For a 2-D line string, the array
will be like x1, y1, x2, y2, ... and for 3-D data, this array will be in a
format of x1, y1, z1, x2, y2, z2, ... You might need to call getDimensionality()
first to see if this line string is 2-D or 3-D, or some higher dimensionality.
- Returns:
- a double array containing all coordinates of this line string
getCoordArray
public int getCoordArray(double[] coordArray,
int pointOffset,
int numPoints)
- Gets the coordinate array of this line string. For a 2-D line string, the array
will be like x1, y1, x2, y2, ... and for 3-D data, this array will be in a
format of x1, y1, z1, x2, y2, z2, ... You might need to call getDimensionality()
first to see if this line string is 2-D or 3-D, or some higher dimensionality.
This method may be memory efficient when you can reuse the double array.
- Parameters:
coordArray
- a preallocated double array that is to be filled with all
coordinates of this line stringpointOffset
- position in this line string from which to begin to
retrieve x, y coordinatesnumPoints
- number of points to retrieve- Returns:
- the actual number of points that are retrieved by this invocation
getOrdArray
public double[] getOrdArray(int i)
- Gets the i-th ordinate array of this line string.
- Returns:
- a double array containing all i-th ordinates of this line string;
or
null
if this geometry object does not have the i-th
ordinate. If the line string is mixed with points of different
dimensionalities, the returned double array will contain the i-th
ordinates when they are available, and Double.NaN when the point
does not have the i-th ordinate.
getOrdArray
public int getOrdArray(double[] ordArray,
int i,
int pointOffset,
int numPoints)
- Gets the i-th ordinate array of this line string.
- Parameters:
ordArray
- a preallocated double array that is to be filled with all
i-th ordinates of this line string. If the line string is
mixed with points of different dimensionalities, the
returned double array will contain the i-th ordinates when
they are available, and Double.NaN when the point does not
have the i-th ordinate.pointOffset
- position in this line string from which to begin to
retrieve the i-th ordinatesnumPoints
- number of points to retrieve- Returns:
- the actual number of points that are retrieved by this invocation