Class LineStringExtracter
- Namespace
- NetTopologySuite.Geometries.Utilities
- Assembly
- NetTopologySuite.dll
Extracts all the LineString elements from a Geometry.
public class LineStringExtracter : IGeometryFilter
- Inheritance
-
LineStringExtracter
- Implements
- Inherited Members
Constructors
LineStringExtracter(ICollection<Geometry>)
Constructs a filter with a list in which to store the elements found.
public LineStringExtracter(ICollection<Geometry> comps)
Parameters
comps
ICollection<Geometry>
Methods
Filter(Geometry)
public void Filter(Geometry geom)
Parameters
geom
Geometry
GetGeometry(Geometry)
Extracts the LineString elements from a single Geometry and returns them as either a LineString or MultiLineString.
public static Geometry GetGeometry(Geometry geom)
Parameters
geom
GeometryThe geometry from which to extract
Returns
- Geometry
A linear geometry
GetLines(Geometry)
Extracts the LineString elements from a single Geometry and returns them in a List<T>.
public static ReadOnlyCollection<Geometry> GetLines(Geometry geom)
Parameters
geom
GeometryThe geometry from which to extract
Returns
- ReadOnlyCollection<Geometry>
A list containing the linear elements
GetLines<TCollection>(Geometry, TCollection)
Extracts the LineString elements from a single Geometry and adds them to theICollection<T>.
public static TCollection GetLines<TCollection>(Geometry geom, TCollection lines) where TCollection : ICollection<Geometry>
Parameters
geom
GeometryThe geometry from which to extract
lines
TCollectionThe list to add the extracted elements to
Returns
- TCollection
The
lines
list argument
Type Parameters
TCollection