|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Segment is a helper interface that represents a part of geometry. A segment is not a geometric entity by itself. It has two end points and usually uniform interpolation in between. This interface is a helper to iterate through a curve string composed of heterogeneous parts. For example, a curve string starts with a linear segment and ends with a circular arc.
Method Summary | |
java.lang.Object |
clone()
Clones this segment to generate another segment object. |
double[] |
getCoordArray()
Gets an array of coordinates (x, y, z, etc.) in this segment. |
int |
getCoordArray(double[] coordArray,
int pointOffset,
int numPoints)
Gets the coordinate array of this segment. |
int |
getDimensionality()
Gets the dimensionality of this segment. |
CoordPoint |
getEndPoint()
Gets the last point of this segment. |
void |
getEndPoint(CoordPoint point)
Gets the last point of this segment. |
Envelope |
getEnvelope()
Gets the envelope for this segment. |
int |
getNumPoints()
Gets the number of coordinate points in this segment. |
CoordPoint[] |
getPointArray()
Gets an array of all coordinate points in this segment. |
int |
getPointArray(CoordPoint[] pointArray,
int pointOffset,
int numPoints)
Gets an array of all coordinate points in this segment. |
void |
getPointAt(CoordPoint point,
int i)
Gets the i-th coordinate point on this segment. |
CoordPoint |
getPointAt(int i)
Gets the i-th coordinate point on this segment. |
java.util.Enumeration |
getPoints()
Gets an enumeration of all coordinate points in this segment. |
java.lang.Class |
getSegmentType()
Gets the segment type as defined in this interface package or extended subtypes defined by users. |
CoordPoint |
getStartPoint()
Gets the first point of this segment. |
void |
getStartPoint(CoordPoint point)
Gets the first point of this segment. |
LinearSegment |
linearizeSegment(double tolerance)
Linearizes (densifies) this segment into a linear geometry segment. |
LinearSegment |
linearizeSegment(int numPoints)
Linearizes (densifies) this segment into a linear geometry segment which may contain more points. |
Method Detail |
public java.lang.Class getSegmentType()
public int getDimensionality()
public CoordPoint getStartPoint()
public void getStartPoint(CoordPoint point)
point
- a preallocated coordinate point that is to be filled with
the ordinates of the first point of this segmentpublic CoordPoint getEndPoint()
public void getEndPoint(CoordPoint point)
point
- a preallocated coordinate point that is to be filled with
the ordinates of the last point of this segmentpublic int getNumPoints()
public java.util.Enumeration getPoints()
public CoordPoint[] getPointArray()
public int getPointArray(CoordPoint[] pointArray, int pointOffset, int numPoints)
pointArray
- a preallocated array of coordinate point to be filled
with all coordinates in this segment. All points
in this array must be preallocated.pointOffset
- position in this curve string from which to begin
to retrieve pointsnumPoints
- number of points to retrievepublic double[] getCoordArray()
public int getCoordArray(double[] coordArray, int pointOffset, int numPoints)
coordArray
- a preallocated double array that is to be filled with all
coordinates of this segmentpointOffset
- position in this segment from which to begin to
retrieve x, y coordinatesnumPoints
- number of points to retrievepublic CoordPoint getPointAt(int i)
i
- the index of the coordinate pointpublic void getPointAt(CoordPoint point, int i)
point
- the coordinate point that is to be filled with the
ordinates of point i of this segmenti
- the index of the coordinate pointpublic Envelope getEnvelope()
public LinearSegment linearizeSegment(int numPoints) throws InvalidGeometryException
numPoints
- the desired number of points that will be in the result
linear geometry segmentpublic LinearSegment linearizeSegment(double tolerance) throws InvalidGeometryException
tolerance
- the maximum tolarable distance between the orginal
segment and the result linear segmentpublic java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |