public class BasicSegmentString extends Objectimplements SegmentString
Coordinates. 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(Coordinate
Creates a new segment string from a list of vertices.
|
| Modifier and Type | Method and Description |
|---|---|
Coordinate |
getCoordinate(int i)
|
Coordinate |
getCoordinates()
|
Object |
getData()
Gets the user-defined data for this segment string.
|
int |
getSegmentOctant(int index)
Gets the octant of the segment starting at vertex
index.
|
boolean |
isClosed()
|
void |
setData(Object
Sets the user-defined data for this segment string.
|
int |
size()
|
public BasicSegmentString(Coordinate[] pts, Object data)
pts - the vertices of the segment string
data - the user-defined data of this segment string (may be null)
public ObjectgetData()
getData in interface
SegmentString
public void setData(Objectdata)
setData in interface
SegmentString
data - an Object containing user-defined data
public int size()
public CoordinategetCoordinate(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