public class BasicSegmentString extends Object implements SegmentString
Coordinatess.
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 and Description |
|---|
BasicSegmentString(LineString points,
Object data)
Creates a new segment string from a list of vertices.
|
| Modifier and Type | Method and Description |
|---|---|
Point |
getCoordinate(int i) |
Object |
getData()
Gets the user-defined data for this segment string.
|
LineString |
getPoints() |
int |
getSegmentOctant(int index)
Gets the octant of the segment starting at vertex
index. |
boolean |
isClosed() |
void |
setData(Object data)
Sets the user-defined data for this segment string.
|
int |
size() |
String |
toString() |
public BasicSegmentString(LineString points, Object data)
points - the vertices of the segment stringdata - the user-defined data of this segment string (may be null)public Point getCoordinate(int i)
getCoordinate in interface SegmentStringpublic Object getData()
getData in interface SegmentStringpublic LineString getPoints()
getPoints in interface SegmentStringpublic int getSegmentOctant(int index)
index.index - the index of the vertex starting the segment. Must not be
the last index in the vertex listpublic boolean isClosed()
isClosed in interface SegmentStringpublic void setData(Object data)
setData in interface SegmentStringdata - an Object containing user-defined datapublic int size()
size in interface SegmentStringCopyright © 2015 Revolution Systems Inc.. All rights reserved.