Show / Hide Table of Contents

    Class LineString

    A LineString is a Curve with linear interpolation between points. Each consecutive pair of points defines a line segment.

    Inheritance
    System.Object
    Geometry
    LineString
    LinearRing
    Implements
    IGeometry
    System.IEquatable<Geometry>
    Inherited Members
    Geometry.Envelope
    Geometry.GetBoundingBox()
    Geometry.AsText()
    Geometry.AsBinary()
    Geometry.ToString()
    Geometry.GeomFromText(String)
    Geometry.GeomFromWKB(Byte[])
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    Namespace: Mapsui.Geometries
    Assembly: Mapsui.Geometries.dll
    Syntax
    public class LineString : Geometry, IGeometry, IEquatable<Geometry>

    Constructors

    | Improve this Doc View Source

    LineString()

    Initializes an instance of a LineString

    Declaration
    public LineString()
    | Improve this Doc View Source

    LineString(IEnumerable<Point>)

    Initializes an instance of a LineString from a set of vertices

    Declaration
    public LineString(IEnumerable<Point> vertices)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<Point> vertices
    | Improve this Doc View Source

    LineString(IEnumerable<Double[]>)

    Initializes an instance of a LineString

    Declaration
    public LineString(IEnumerable<double[]> points)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<System.Double[]> points

    Properties

    | Improve this Doc View Source

    BoundingBox

    The minimum bounding box for this Geometry.

    Declaration
    public override BoundingBox BoundingBox { get; }
    Property Value
    Type Description
    BoundingBox

    BoundingBox for this geometry

    Overrides
    Geometry.BoundingBox
    | Improve this Doc View Source

    EndPoint

    Gets the vertice where this Geometry ends

    Declaration
    public Point EndPoint { get; }
    Property Value
    Type Description
    Point

    Last vertice in LineString

    | Improve this Doc View Source

    IsClosed

    Returns true if this Curve is closed (StartPoint = EndPoint).

    Declaration
    public bool IsClosed { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    Length

    The length of this LineString, as measured in the spatial reference system of this LineString.

    Declaration
    public double Length { get; }
    Property Value
    Type Description
    System.Double
    | Improve this Doc View Source

    NumPoints

    The number of points in this LineString.

    Declaration
    public int NumPoints { get; }
    Property Value
    Type Description
    System.Int32
    Remarks

    This method is supplied as part of the OpenGIS Simple Features Specification

    | Improve this Doc View Source

    StartPoint

    Returns the vertice where this Geometry begins

    Declaration
    public Point StartPoint { get; }
    Property Value
    Type Description
    Point

    First vertice in LineString

    | Improve this Doc View Source

    Vertices

    Gets or sets the collection of vertices in this Geometry

    Declaration
    public IList<Point> Vertices { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.IList<Point>

    Methods

    | Improve this Doc View Source

    Clone()

    Return a copy of this geometry

    Declaration
    public LineString Clone()
    Returns
    Type Description
    LineString

    Copy of Geometry

    | Improve this Doc View Source

    Contains(Point)

    Declaration
    public override bool Contains(Point point)
    Parameters
    Type Name Description
    Point point
    Returns
    Type Description
    System.Boolean
    Overrides
    Geometry.Contains(Point)
    | Improve this Doc View Source

    Distance(Point)

    Returns the shortest distance between any two points in the two geometries as calculated in the spatial reference system of this Geometry.

    Declaration
    public override double Distance(Point point)
    Parameters
    Type Name Description
    Point point

    Geometry to calculate distance to

    Returns
    Type Description
    System.Double

    Shortest distance between any two points in the two geometries

    Overrides
    Geometry.Distance(Point)
    | Improve this Doc View Source

    Equals(Geometry)

    Declaration
    public override bool Equals(Geometry geom)
    Parameters
    Type Name Description
    Geometry geom
    Returns
    Type Description
    System.Boolean
    Overrides
    Geometry.Equals(Geometry)
    | Improve this Doc View Source

    Equals(LineString)

    Checks whether this instance is spatially equal to the LineString 'l'

    Declaration
    public bool Equals(LineString lineString)
    Parameters
    Type Name Description
    LineString lineString

    LineString to compare to

    Returns
    Type Description
    System.Boolean

    true of the objects are spatially equal

    | Improve this Doc View Source

    GetHashCode()

    Serves as a hash function for a particular type. GetHashCode() is suitable for use in hashing algorithms and data structures like a hash table.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    System.Int32

    A hash code for the current GetHashCode().

    Overrides
    Geometry.GetHashCode()
    | Improve this Doc View Source

    GetSegments()

    Returns a list of line string segments

    Declaration
    public List<LineString> GetSegments()
    Returns
    Type Description
    System.Collections.Generic.List<LineString>

    List of LineString

    | Improve this Doc View Source

    IsEmpty()

    If true, then this Geometry represents the empty point set, Ø, for the coordinate space.

    Declaration
    public override bool IsEmpty()
    Returns
    Type Description
    System.Boolean

    Returns 'true' if this Geometry is the empty geometry

    Overrides
    Geometry.IsEmpty()
    | Improve this Doc View Source

    IsSimple()

    Returns 'true' if this Geometry has no anomalous geometric points, such as self intersection or self tangency. The description of each instantiable geometric class will include the specific conditions that cause an instance of that class to be classified as not simple.

    Declaration
    public bool IsSimple()
    Returns
    Type Description
    System.Boolean

    true if the geometry is simple

    | Improve this Doc View Source

    Point(Int32)

    Returns the specified point N in this Linestring.

    Declaration
    public Point Point(int n)
    Parameters
    Type Name Description
    System.Int32 n
    Returns
    Type Description
    Point
    Remarks

    This method is supplied as part of the OpenGIS Simple Features Specification

    Implements

    IGeometry
    System.IEquatable<T>

    Extension Methods

    GeometryExtensions.Copy(IGeometry)
    GeometryIterator.AllVertices(IGeometry)
    • Improve this Doc
    • View Source
    Back to top Generated by DocFX