Class: BasicSegmentString

jsts.noding.BasicSegmentString

new BasicSegmentString(pts, data)

Represents a list of contiguous line segments, and supports noding the segments. The line segments are represented by an array of 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. Creates a new segment string from a list of vertices.
Parameters:
Name Type Description
pts the vertices of the segment string.
data the user-defined data of this segment string (may be null).
Source:

Methods

getData()

Gets the user-defined data for this segment string.
Source:
Returns:
the user-defined data.

getSegmentOctant(index)

Gets the octant of the segment starting at vertex index.
Parameters:
Name Type Description
index the index of the vertex starting the segment. Must not be the last index in the vertex list.
Source:
Returns:
the octant of the segment at the vertex.

setData(data)

Sets the user-defined data for this segment string.
Parameters:
Name Type Description
data an Object containing user-defined data.
Source: