|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.vividsolutions.jts.noding.SegmentString
Represents a list of contiguous line segments,
and supports noding the segments.
The line segments are represented by an array of Coordinate
s.
Intended to optimize the noding of contiguous segments by
reducing the number of allocated objects.
SegmentStrings can carry a context object, which is useful
for preserving topological or parentage information.
All noded substrings are initialized with the same context object.
Constructor Summary | |
SegmentString(Coordinate[] pts,
java.lang.Object data)
Creates a new segment string from a list of vertices. |
Method Summary | |
void |
addIntersection(Coordinate intPt,
int segmentIndex)
|
void |
addIntersection(LineIntersector li,
int segmentIndex,
int geomIndex,
int intIndex)
Add an SegmentNode for intersection intIndex. |
void |
addIntersections(LineIntersector li,
int segmentIndex,
int geomIndex)
Adds EdgeIntersections for one or both intersections found for a segment of an edge to the edge intersection list. |
Coordinate |
getCoordinate(int i)
|
Coordinate[] |
getCoordinates()
|
java.lang.Object |
getData()
Gets the user-defined data for this segment string. |
static java.util.List |
getNodedSubstrings(java.util.Collection segStrings)
|
static void |
getNodedSubstrings(java.util.Collection segStrings,
java.util.Collection resultEdgelist)
|
SegmentNodeList |
getNodeList()
|
int |
getSegmentOctant(int index)
Gets the octant of the segment starting at vertex index . |
boolean |
isClosed()
|
void |
setData(java.lang.Object data)
Sets the user-defined data for this segment string. |
int |
size()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SegmentString(Coordinate[] pts, java.lang.Object data)
pts
- the vertices of the segment stringdata
- the user-defined data of this segment string (may be null)Method Detail |
public static java.util.List getNodedSubstrings(java.util.Collection segStrings)
public static void getNodedSubstrings(java.util.Collection segStrings, java.util.Collection resultEdgelist)
public java.lang.Object getData()
public void setData(java.lang.Object data)
data
- an Object containing user-defined datapublic SegmentNodeList getNodeList()
public int size()
public Coordinate getCoordinate(int i)
public Coordinate[] getCoordinates()
public boolean isClosed()
public int getSegmentOctant(int index)
index
.
index
- the index of the vertex starting the segment. Must not be
the last index in the vertex list
public void addIntersections(LineIntersector li, int segmentIndex, int geomIndex)
public void addIntersection(LineIntersector li, int segmentIndex, int geomIndex, int intIndex)
public void addIntersection(Coordinate intPt, int segmentIndex)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |