Class LineStringExtracter
Extracts all the LineString elements from a Geometry.
Implements
Inherited Members
Namespace: NetTopologySuite.Geometries.Utilities
Assembly: NetTopologySuite.dll
Syntax
public class LineStringExtracter : IGeometryFilter
Constructors
| Improve this Doc View SourceLineStringExtracter(ICollection<Geometry>)
Constructs a filter with a list in which to store the elements found.
Declaration
public LineStringExtracter(ICollection<Geometry> comps)
Parameters
Type | Name | Description |
---|---|---|
ICollection<Geometry> | comps |
Methods
| Improve this Doc View SourceFilter(Geometry)
Declaration
public void Filter(Geometry geom)
Parameters
Type | Name | Description |
---|---|---|
Geometry | geom |
GetGeometry(Geometry)
Extracts the LineString elements 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 |
GetLines(Geometry)
Extracts the LineString elements from a single Geometry and returns them in a List<T>.
Declaration
public static ReadOnlyCollection<Geometry> GetLines(Geometry geom)
Parameters
Type | Name | Description |
---|---|---|
Geometry | geom | The geometry from which to extract |
Returns
Type | Description |
---|---|
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>.
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 |
TCollection | lines | The list to add the extracted elements to |
Returns
Type | Description |
---|---|
TCollection | The |
Type Parameters
Name | Description |
---|---|
TCollection |