Class BasicSegmentString
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.
Inheritance
BasicSegmentString
Assembly: NetTopologySuite.dll
Syntax
public class BasicSegmentString : ISegmentString
Constructors
|
Edit this page
View Source
BasicSegmentString(Coordinate[], object)
Creates a new segment string from a list of vertices.
Declaration
public BasicSegmentString(Coordinate[] pts, object data)
Parameters
Type |
Name |
Description |
Coordinate[] |
pts |
the vertices of the segment string
|
object |
data |
the user-defined data of this segment string (may be null)
|
Properties
|
Edit this page
View Source
Context
Gets the user-defined data for this segment string.
Declaration
public object Context { get; set; }
Property Value
|
Edit this page
View Source
Coordinates
Declaration
public Coordinate[] Coordinates { get; }
Property Value
|
Edit this page
View Source
Count
Gets the number of Coordinate
s in this segment string.
Declaration
public int Count { get; }
Property Value
|
Edit this page
View Source
IsClosed
States whether ISegmentString is closed
Declaration
public bool IsClosed { get; }
Property Value
|
Edit this page
View Source
this[int]
Declaration
public LineSegment this[int index] { get; set; }
Parameters
Type |
Name |
Description |
int |
index |
|
Property Value
Methods
|
Edit this page
View Source
GetCoordinate(int)
Declaration
public Coordinate GetCoordinate(int idx)
Parameters
Type |
Name |
Description |
int |
idx |
|
Returns
|
Edit this page
View Source
GetSegmentOctant(int)
Gets the octant of the segment starting at vertex index
Declaration
public Octants GetSegmentOctant(int index)
Parameters
Type |
Name |
Description |
int |
index |
the index of the vertex starting the segment. Must not be the last index in the vertex list
|
Returns
Type |
Description |
Octants |
octant of the segment at the vertex
|
|
Edit this page
View Source
ToString()
Declaration
public override string ToString()
Returns
Overrides
Implements
Extension Methods
See Also