Class TaggedLineString
Represents a LineString which can be modified to a simplified shape. This class provides an attribute which specifies the minimum allowable length for the modified result.
Inherited Members
Namespace: NetTopologySuite.Simplify
Assembly: NetTopologySuite.dll
Syntax
public class TaggedLineString
Constructors
| Edit this page View SourceTaggedLineString(LineString)
Creates an instance of this class using the provided parentLine.
The MinimumSize is set to 2 and PreserveEndpoint is true.
Declaration
[Obsolete]
public TaggedLineString(LineString parentLine)
Parameters
| Type | Name | Description |
|---|---|---|
| LineString | parentLine | The |
TaggedLineString(LineString, int)
Creates an instance of this class using the provided parentLine and
minimumSize values. The value for IsRing is LineString.IsRing
Declaration
[Obsolete]
public TaggedLineString(LineString parentLine, int minimumSize)
Parameters
| Type | Name | Description |
|---|---|---|
| LineString | parentLine | The |
| int | minimumSize | The number of vertices to must be kept. |
TaggedLineString(LineString, int, bool)
Creates an instance of this class using the provided parentLine and
minimumSize values.
Declaration
public TaggedLineString(LineString parentLine, int minimumSize, bool isRing)
Parameters
| Type | Name | Description |
|---|---|---|
| LineString | parentLine | The |
| int | minimumSize | The number of vertices to must be kept. |
| bool | isRing | A flag indicating if the |
Properties
| Edit this page View SourceCount
Gets a value indicating the number of points of the Parent line.
Declaration
public int Count { get; }
Property Value
| Type | Description |
|---|---|
| int |
IsRing
Gets a value indicating if the endpoints are to be preserved.
Declaration
public bool IsRing { get; }
Property Value
| Type | Description |
|---|---|
| bool |
MinimumSize
Declaration
public int MinimumSize { get; }
Property Value
| Type | Description |
|---|---|
| int |
Parent
Declaration
public LineString Parent { get; }
Property Value
| Type | Description |
|---|---|
| LineString |
ParentCoordinates
Declaration
public Coordinate[] ParentCoordinates { get; }
Property Value
| Type | Description |
|---|---|
| Coordinate[] |
ResultCoordinates
Declaration
public Coordinate[] ResultCoordinates { get; }
Property Value
| Type | Description |
|---|---|
| Coordinate[] |
ResultSize
Declaration
public int ResultSize { get; }
Property Value
| Type | Description |
|---|---|
| int |
Segments
Declaration
public TaggedLineSegment[] Segments { get; }
Property Value
| Type | Description |
|---|---|
| TaggedLineSegment[] |
Methods
| Edit this page View SourceAddToResult(LineSegment)
Add a simplified segment to the result. This assumes simplified segments are computed in the order they occur in the line.
Declaration
public void AddToResult(LineSegment seg)
Parameters
| Type | Name | Description |
|---|---|---|
| LineSegment | seg | The result segment to add. |
AsLineString()
Declaration
public LineString AsLineString()
Returns
| Type | Description |
|---|---|
| LineString |
AsLinearRing()
Declaration
public LinearRing AsLinearRing()
Returns
| Type | Description |
|---|---|
| LinearRing |
GetComponentPoint()
Gets a Coordinate of the Parent line.
Declaration
public Coordinate GetComponentPoint()
Returns
| Type | Description |
|---|---|
| Coordinate | A |
GetCoordinate(int)
Gets the i'th Coordinate of Parent line.
Declaration
public Coordinate GetCoordinate(int i)
Parameters
| Type | Name | Description |
|---|---|---|
| int | i | The index of the coordinate to get |
Returns
| Type | Description |
|---|---|
| Coordinate | The |
GetResultSegment(int)
Gets a segment of the result list. Negative indexes can be used to retrieve from the end of the list.
Declaration
public LineSegment GetResultSegment(int i)
Parameters
| Type | Name | Description |
|---|---|---|
| int | i | The segment index to retrieve |
Returns
| Type | Description |
|---|---|
| LineSegment | The result segment |
GetSegment(int)
Declaration
public TaggedLineSegment GetSegment(int i)
Parameters
| Type | Name | Description |
|---|---|---|
| int | i |
Returns
| Type | Description |
|---|---|
| TaggedLineSegment |