Class LineString
Models an OGC-style LineString
Assembly: NetTopologySuite.dll
Syntax
[Serializable]
public class LineString : Geometry, IComparable, IComparable<Geometry>, ILineal
Constructors
|
Improve this Doc
View Source
LineString(Coordinate[])
Initializes a new instance of the LineString class.
Declaration
public LineString(Coordinate[] points)
Parameters
Exceptions
|
Improve this Doc
View Source
LineString(CoordinateSequence, GeometryFactory)
Initializes a new instance of the LineString class.
Declaration
public LineString(CoordinateSequence points, GeometryFactory factory)
Parameters
Type |
Name |
Description |
CoordinateSequence |
points |
The points of the LineString , or null
to create the empty point. Consecutive points may not be equal.
|
GeometryFactory |
factory |
|
Exceptions
Fields
|
Improve this Doc
View Source
Empty
Represents an empty LineString
.
Declaration
public static readonly LineString Empty
Field Value
|
Improve this Doc
View Source
MinimumValidSize
The minimum number of vertices allowed in a valid non-empty linestring.
Empty linestrings with 0 vertices are also valid.
Declaration
public const int MinimumValidSize = 2
Field Value
Properties
|
Improve this Doc
View Source
Boundary
Returns the boundary, or an empty geometry of appropriate dimension
if this Geometry
is empty.
For a discussion of this function, see the OpenGIS Simple
Features Specification. As stated in SFS Section 2.1.13.1, "the boundary
of a Geometry is a set of Geometries of the next lower dimension."
Declaration
public override Geometry Boundary { get; }
Property Value
Type |
Description |
Geometry |
The closure of the combinatorial boundary of this Geometry .
|
Overrides
|
Improve this Doc
View Source
BoundaryDimension
Declaration
public override Dimension BoundaryDimension { get; }
Property Value
Overrides
|
Improve this Doc
View Source
Coordinate
Declaration
public override Coordinate Coordinate { get; }
Property Value
Overrides
|
Improve this Doc
View Source
Coordinates
Returns an array containing the values of all the vertices for
this geometry.
Declaration
public override Coordinate[] Coordinates { get; }
Property Value
Type |
Description |
Coordinate[] |
The vertices of this Geometry .
|
Overrides
See Also
|
Improve this Doc
View Source
CoordinateSequence
Declaration
public CoordinateSequence CoordinateSequence { get; }
Property Value
|
Improve this Doc
View Source
Count
Declaration
public int Count { get; }
Property Value
|
Improve this Doc
View Source
Dimension
Declaration
public override Dimension Dimension { get; }
Property Value
Overrides
|
Improve this Doc
View Source
EndPoint
Gets a value indicating the end point of this LINESTRING
Declaration
public Point EndPoint { get; }
Property Value
|
Improve this Doc
View Source
GeometryType
Returns the name of this object's interface.
Declaration
public override string GeometryType { get; }
Property Value
Type |
Description |
String |
"LineString"
|
Overrides
|
Improve this Doc
View Source
IsClosed
Gets a value indicating if this LINESTRING
is closed.
Declaration
public virtual bool IsClosed { get; }
Property Value
|
Improve this Doc
View Source
IsEmpty
Declaration
public override bool IsEmpty { get; }
Property Value
Overrides
|
Improve this Doc
View Source
IsRing
Gets a value indicating if this LINESTRING
forms a ring.
Declaration
public bool IsRing { get; }
Property Value
|
Improve this Doc
View Source
Item[Int32]
Declaration
public Coordinate this[int n] { get; set; }
Parameters
Type |
Name |
Description |
Int32 |
n |
|
Property Value
|
Improve this Doc
View Source
Length
Returns the length of this LineString
Declaration
public override double Length { get; }
Property Value
Type |
Description |
Double |
The length of the polygon.
|
Overrides
|
Improve this Doc
View Source
NumPoints
Declaration
public override int NumPoints { get; }
Property Value
Overrides
|
Improve this Doc
View Source
OgcGeometryType
Gets the OGC geometry type
Declaration
public override OgcGeometryType OgcGeometryType { get; }
Property Value
Overrides
|
Improve this Doc
View Source
SortIndex
Gets a value to sort the geometry
Declaration
protected override Geometry.SortIndexValue SortIndex { get; }
Property Value
Overrides
|
Improve this Doc
View Source
StartPoint
Gets a value indicating the start point of this LINESTRING
Declaration
public Point StartPoint { get; }
Property Value
Methods
|
Improve this Doc
View Source
Apply(ICoordinateFilter)
Declaration
public override void Apply(ICoordinateFilter filter)
Parameters
Overrides
|
Improve this Doc
View Source
Apply(ICoordinateSequenceFilter)
Declaration
public override void Apply(ICoordinateSequenceFilter filter)
Parameters
Overrides
|
Improve this Doc
View Source
Apply(IEntireCoordinateSequenceFilter)
Declaration
public override void Apply(IEntireCoordinateSequenceFilter filter)
Parameters
Overrides
|
Improve this Doc
View Source
Apply(IGeometryComponentFilter)
Performs an operation with or on this Geometry and its
component Geometry's. Only GeometryCollections and
Polygons have component Geometry's; for Polygons they are the LinearRings
of the shell and holes.
Declaration
public override void Apply(IGeometryComponentFilter filter)
Parameters
Overrides
|
Improve this Doc
View Source
Apply(IGeometryFilter)
Performs an operation with or on this Geometry
and its
subelement Geometry
s (if any).
Only GeometryCollections and subclasses
have subelement Geometry's.
Declaration
public override void Apply(IGeometryFilter filter)
Parameters
Type |
Name |
Description |
IGeometryFilter |
filter |
The filter to apply to this Geometry (and
its children, if it is a GeometryCollection ).
|
Overrides
|
Improve this Doc
View Source
CompareToSameClass(Object)
Declaration
protected override int CompareToSameClass(object o)
Parameters
Type |
Name |
Description |
Object |
o |
|
Returns
Overrides
|
Improve this Doc
View Source
CompareToSameClass(Object, IComparer<CoordinateSequence>)
Declaration
protected override int CompareToSameClass(object o, IComparer<CoordinateSequence> comp)
Parameters
Returns
Overrides
|
Improve this Doc
View Source
ComputeEnvelopeInternal()
Declaration
protected override Envelope ComputeEnvelopeInternal()
Returns
Overrides
|
Improve this Doc
View Source
CopyInternal()
Declaration
protected override Geometry CopyInternal()
Returns
Overrides
|
Improve this Doc
View Source
EqualsExact(Geometry, Double)
Declaration
public override bool EqualsExact(Geometry other, double tolerance)
Parameters
Returns
Overrides
|
Improve this Doc
View Source
GetCoordinateN(Int32)
Declaration
public Coordinate GetCoordinateN(int n)
Parameters
Type |
Name |
Description |
Int32 |
n |
|
Returns
|
Improve this Doc
View Source
GetOrdinates(Ordinate)
Gets an array of Double ordinate values
Declaration
public override double[] GetOrdinates(Ordinate ordinate)
Parameters
Type |
Name |
Description |
Ordinate |
ordinate |
The ordinate index
|
Returns
Type |
Description |
Double[] |
An array of ordinate values
|
Overrides
|
Improve this Doc
View Source
GetPointN(Int32)
Declaration
public Point GetPointN(int n)
Parameters
Type |
Name |
Description |
Int32 |
n |
|
Returns
|
Improve this Doc
View Source
IsCoordinate(Coordinate)
Returns true if the given point is a vertex of this LineString
.
Declaration
public virtual bool IsCoordinate(Coordinate pt)
Parameters
Type |
Name |
Description |
Coordinate |
pt |
The Coordinate to check.
|
Returns
Type |
Description |
Boolean |
true if pt is one of this LineString 's vertices.
|
|
Improve this Doc
View Source
IsEquivalentClass(Geometry)
Declaration
protected override bool IsEquivalentClass(Geometry other)
Parameters
Returns
Overrides
|
Improve this Doc
View Source
Normalize()
Normalizes a LineString
. A normalized LineString
has the first point which is not equal to it's reflected point
less than the reflected point.
Declaration
public override void Normalize()
Overrides
|
Improve this Doc
View Source
Reverse()
Creates a LineString whose coordinates are in the reverse order of this objects.
Declaration
[Obsolete("Call Geometry.Reverse()")]
public override Geometry Reverse()
Returns
Overrides
|
Improve this Doc
View Source
ReverseInternal()
The actual implementation of the Reverse() function for LINESTRING
s.
Declaration
protected override Geometry ReverseInternal()
Returns
Type |
Description |
Geometry |
A reversed geometry
|
Overrides
Implements