Package org.locationtech.jts.geom.util
Class LineStringExtracter
- java.lang.Object
-
- org.locationtech.jts.geom.util.LineStringExtracter
-
- All Implemented Interfaces:
GeometryFilter
public class LineStringExtracter extends Object implements GeometryFilter
Extracts all theLineStringelements from aGeometry.- Version:
- 1.7
- See Also:
GeometryExtracter
-
-
Constructor Summary
Constructors Constructor Description LineStringExtracter(List comps)Constructs a filter with a list in which to store the elements found.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfilter(Geometry geom)Performs an operation with or ongeom.static GeometrygetGeometry(Geometry geom)Extracts theLineStringelements from a singleGeometryand returns them as either aLineStringorMultiLineString.static ListgetLines(Geometry geom)static ListgetLines(Geometry geom, List lines)
-
-
-
Constructor Detail
-
LineStringExtracter
public LineStringExtracter(List comps)
Constructs a filter with a list in which to store the elements found.
-
-
Method Detail
-
getLines
public static List getLines(Geometry geom, List lines)
- Parameters:
geom- the geometry from which to extractlines- the list to add the extracted LineStrings to- Returns:
- the list argument
-
getLines
public static List getLines(Geometry geom)
- Parameters:
geom- the geometry from which to extract- Returns:
- a list containing the linear elements
-
getGeometry
public static Geometry getGeometry(Geometry geom)
Extracts theLineStringelements from a singleGeometryand returns them as either aLineStringorMultiLineString.- Parameters:
geom- the geometry from which to extract- Returns:
- a linear geometry
-
filter
public void filter(Geometry geom)
Description copied from interface:GeometryFilterPerforms an operation with or ongeom.- Specified by:
filterin interfaceGeometryFilter- Parameters:
geom- aGeometryto which the filter is applied.
-
-