Search Results for

    Show / Hide Table of Contents

    Class LinearComponentExtracter

    Extracts all the 1-dimensional (LineString) components from a Geometry. For polygonal geometries, this will extract all the component LinearRings. If desired, LinearRings can be forced to be returned as LineStrings.

    Inheritance
    object
    LinearComponentExtracter
    Implements
    IGeometryComponentFilter
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: NetTopologySuite.Geometries.Utilities
    Assembly: NetTopologySuite.dll
    Syntax
    public class LinearComponentExtracter : IGeometryComponentFilter

    Constructors

    | Edit this page View Source

    LinearComponentExtracter(ICollection<Geometry>)

    Constructs a LineExtracterFilter with a list in which to store LineStrings found.

    Declaration
    public LinearComponentExtracter(ICollection<Geometry> lines)
    Parameters
    Type Name Description
    ICollection<Geometry> lines
    | Edit this page View Source

    LinearComponentExtracter(ICollection<Geometry>, bool)

    Constructs a LineExtracterFilter with a list in which to store LineStrings found.

    Declaration
    public LinearComponentExtracter(ICollection<Geometry> lines, bool isForcedToLineString)
    Parameters
    Type Name Description
    ICollection<Geometry> lines
    bool isForcedToLineString

    Properties

    | Edit this page View Source

    IsForcedToLineString

    Declaration
    public bool IsForcedToLineString { get; set; }
    Property Value
    Type Description
    bool

    Methods

    | Edit this page View Source

    Filter(Geometry)

    Declaration
    public void Filter(Geometry geom)
    Parameters
    Type Name Description
    Geometry geom
    | Edit this page View Source

    GetGeometry(Geometry)

    Extracts the linear components from a single Geometry and returns them as either a LineString or MultiLineString.

    Declaration
    public static Geometry GetGeometry(Geometry geom)
    Parameters
    Type Name Description
    Geometry geom

    The geometry from which to extract

    Returns
    Type Description
    Geometry

    A linear geometry

    | Edit this page View Source

    GetGeometry(Geometry, bool)

    Extracts the linear components from a single Geometry and returns them as either a LineString or MultiLineString.

    Declaration
    public static Geometry GetGeometry(Geometry geom, bool forceToLineString)
    Parameters
    Type Name Description
    Geometry geom

    The geometry from which to extract

    bool forceToLineString

    true if LinearRings should be converted to LineStrings

    Returns
    Type Description
    Geometry

    A linear geometry

    | Edit this page View Source

    GetLines(Geometry)

    Extracts the linear components from a single point. If more than one point is to be processed, it is more efficient to create a single LineExtracterFilter instance and pass it to multiple geometries.

    Declaration
    public static ReadOnlyCollection<Geometry> GetLines(Geometry geom)
    Parameters
    Type Name Description
    Geometry geom

    The point from which to extract linear components.

    Returns
    Type Description
    ReadOnlyCollection<Geometry>

    The list of linear components.

    | Edit this page View Source

    GetLines(Geometry, bool)

    Extracts the linear components from a single geometry. If more than one geometry is to be processed, it is more efficient to create a single LinearComponentExtracter instance and pass it to multiple geometries.

    Declaration
    public static ReadOnlyCollection<Geometry> GetLines(Geometry geom, bool forceToLineString)
    Parameters
    Type Name Description
    Geometry geom

    The geometry from which to extract linear components

    bool forceToLineString

    true if LinearRings should be converted to LineStrings

    Returns
    Type Description
    ReadOnlyCollection<Geometry>

    The list of linear components

    | Edit this page View Source

    GetLines<TCollection>(Geometry, TCollection)

    Extracts the linear components from a single Geometry and adds them to the provided ICollection<T>.

    Declaration
    public static TCollection GetLines<TCollection>(Geometry geom, TCollection lines) where TCollection : ICollection<Geometry>
    Parameters
    Type Name Description
    Geometry geom

    The geometry from which to extract linear components

    TCollection lines

    The Collection to add the extracted linear components to

    Returns
    Type Description
    TCollection

    The Collection of linear components (LineStrings or LinearRings)

    Type Parameters
    Name Description
    TCollection
    | Edit this page View Source

    GetLines<TCollection>(Geometry, TCollection, bool)

    Extracts the linear components from a single Geometry and adds them to the provided ICollection<T>.

    Declaration
    public static TCollection GetLines<TCollection>(Geometry geom, TCollection lines, bool forceToLineString) where TCollection : ICollection<Geometry>
    Parameters
    Type Name Description
    Geometry geom

    The geometry from which to extract linear components

    TCollection lines

    The Collection to add the extracted linear components to

    bool forceToLineString
    Returns
    Type Description
    TCollection

    The Collection of linear components (LineStrings or LinearRings)

    Type Parameters
    Name Description
    TCollection
    | Edit this page View Source

    GetLines<TCollection>(IEnumerable<Geometry>, TCollection)

    Extracts the linear components from a IEnumerable<T> and adds them to the provided ICollection<T>.

    Declaration
    public static TCollection GetLines<TCollection>(IEnumerable<Geometry> geoms, TCollection lines) where TCollection : ICollection<Geometry>
    Parameters
    Type Name Description
    IEnumerable<Geometry> geoms

    The geometry from which to extract linear components

    TCollection lines

    The Collection to add the extracted linear components to

    Returns
    Type Description
    TCollection

    The Collection of linear components (LineStrings or LinearRings)

    Type Parameters
    Name Description
    TCollection
    | Edit this page View Source

    GetLines<TCollection>(IEnumerable<Geometry>, TCollection, bool)

    Extracts the linear components from a IEnumerable<T> and adds them to the provided ICollection<T>.

    Declaration
    public static TCollection GetLines<TCollection>(IEnumerable<Geometry> geoms, TCollection lines, bool forceToLineString) where TCollection : ICollection<Geometry>
    Parameters
    Type Name Description
    IEnumerable<Geometry> geoms

    The geometry from which to extract linear components

    TCollection lines

    The Collection to add the extracted linear components to

    bool forceToLineString
    Returns
    Type Description
    TCollection

    The Collection of linear components (LineStrings or LinearRings)

    Type Parameters
    Name Description
    TCollection

    Implements

    IGeometryComponentFilter
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX