Class: NodedSegmentString

jsts.noding.NodedSegmentString

new NodedSegmentString(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

(static) getNodedSubstrings(segStrings, resultEdgelist) → {Array}

Gets the SegmentStrings which result from splitting this string at node points.
Parameters:
Name Type Description
segStrings javascript.util.Collection a Collection of NodedSegmentStrings.
resultEdgelist javascript.util.Collection a List which will collect the NodedSegmentStrings representing the substrings.
Source:
Returns:
a Collection of NodedSegmentStrings representing the substrings.
Type
Array

(static) getNodedSubstrings2(segStrings, resultEdgelist)

Adds the noded SegmentStrings which result from splitting this string at node points.
Parameters:
Name Type Description
segStrings javascript.util.Collection a Collection of NodedSegmentStrings.
resultEdgelist javascript.util.Collection a List which will collect the NodedSegmentStrings representing the substrings.
Source:

addIntersection()

Add an SegmentNode for intersection intIndex. An intersection that falls exactly on a vertex of the SegmentString is normalized to use the higher of the two possible segmentIndexes
Source:

addIntersection2(intPt, segmentIndex)

Adds an intersection node for a given point and segment to this segment string.
Parameters:
Name Type Description
intPt jsts.geom.Coordinate the location of the intersection.
segmentIndex the index of the segment containing the intersection.
Source:

addIntersectionNode(intPt, segmentIndex) → {SegmentNode}

Adds an intersection node for a given point and segment to this segment string. If an intersection already exists for this exact location, the existing node will be returned.
Parameters:
Name Type Description
intPt jsts.geom.Coordinate the location of the intersection.
segmentIndex the index of the segment containing the intersection.
Source:
Returns:
the intersection node for the point.
Type
SegmentNode

addIntersections()

Adds EdgeIntersections for one or both intersections found for a segment of an edge to the edge intersection list.
Source:

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.