NodedSegmentString class

Represents a list of contiguous line segments, and supports noding the segments. The line segments are represented by an array of {@link 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.

@version 1.7

Implemented types

Constructors

NodedSegmentString(List<Coordinate> pts, Object data)
Creates a new segment string from a list of vertices.

Properties

data Object
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
nodeList SegmentNodeList
getter/setter pair
pts List<Coordinate>
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addIntersection(Coordinate intPt, int segmentIndex) → void
Adds an intersection node for a given point and segment to this segment string.
override
addIntersectionLI(LineIntersector li, int segmentIndex, int geomIndex, int intIndex) → void
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
addIntersectionNode(Coordinate intPt, int 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.
addIntersections(LineIntersector li, int segmentIndex, int geomIndex) → void
Adds EdgeIntersections for one or both intersections found for a segment of an edge to the edge intersection list.
getCoordinate(int i) Coordinate
override
getCoordinates() List<Coordinate>
override
getData() Object
Gets the user-defined data for this segment string.
override
getNodeList() SegmentNodeList
getSegmentOctant(int index) int
Gets the octant of the segment starting at vertex index.
isClosed() bool
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
safeOctant(Coordinate p0, Coordinate p1) int
setData(Object data) → void
Sets the user-defined data for this segment string.
override
size() int
override
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

getNodedSubstrings(List segStrings) List
Gets the {@link SegmentString}s which result from splitting this string at node points.
getNodedSubstrings2(List segStrings, List resultEdgelist) → void
Adds the noded {@link SegmentString}s which result from splitting this string at node points.