Class BasicSegmentString
- Namespace
- NetTopologySuite.Noding
- Assembly
- NetTopologySuite.dll
Represents a read-only list of contiguous line segments. This can be used for detection of intersections or nodes. ISegmentStrings can carry a context object, which is useful for preserving topological or parentage information.
If adding nodes is required use NodedSegmentString.public class BasicSegmentString : ISegmentString
- Inheritance
-
BasicSegmentString
- Implements
- Inherited Members
Constructors
BasicSegmentString(Coordinate[], object)
Creates a new segment string from a list of vertices.
public BasicSegmentString(Coordinate[] pts, object data)
Parameters
ptsCoordinate[]the vertices of the segment string
dataobjectthe user-defined data of this segment string (may be null)
- See Also
Properties
Context
Gets the user-defined data for this segment string.
public object Context { get; set; }
Property Value
- See Also
Coordinates
Points that make up ISegmentString
public Coordinate[] Coordinates { get; }
Property Value
- See Also
Count
Size of Coordinate Sequence
public int Count { get; }
Property Value
- See Also
IsClosed
States whether ISegmentString is closed
public bool IsClosed { get; }
Property Value
- See Also
this[int]
public LineSegment this[int index] { get; set; }
Parameters
indexint
Property Value
- See Also
Methods
GetSegmentOctant(int)
Gets the octant of the segment starting at vertex index
public Octants GetSegmentOctant(int index)
Parameters
indexintthe index of the vertex starting the segment. Must not be the last index in the vertex list
Returns
- Octants
octant of the segment at the vertex
- See Also
ToString()
public override string ToString()
Returns
- See Also