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 java.lang.Object implements GeometryFilter
Extracts all theLineString
elements from aGeometry
.- Version:
- 1.7
- See Also:
GeometryExtracter
-
-
Constructor Summary
Constructors Constructor Description LineStringExtracter(java.util.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 void
filter(Geometry geom)
Performs an operation with or ongeom
.static Geometry
getGeometry(Geometry geom)
Extracts theLineString
elements from a singleGeometry
and returns them as either aLineString
orMultiLineString
.static java.util.List
getLines(Geometry geom)
static java.util.List
getLines(Geometry geom, java.util.List lines)
-
-
-
Method Detail
-
getLines
public static java.util.List getLines(Geometry geom, java.util.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 java.util.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 theLineString
elements from a singleGeometry
and returns them as either aLineString
orMultiLineString
.- Parameters:
geom
- the geometry from which to extract- Returns:
- a linear geometry
-
filter
public void filter(Geometry geom)
Description copied from interface:GeometryFilter
Performs an operation with or ongeom
.- Specified by:
filter
in interfaceGeometryFilter
- Parameters:
geom
- aGeometry
to which the filter is applied.
-
-