JTS Topology Suite version 1.12

com.vividsolutions.jts.geom.util
Class LineStringExtracter

java.lang.Object
  extended by com.vividsolutions.jts.geom.util.LineStringExtracter
All Implemented Interfaces:
GeometryFilter

public class LineStringExtracter
extends java.lang.Object
implements GeometryFilter

Extracts all the LineString elements from a Geometry.

Version:
1.7
See Also:
GeometryExtracter

Constructor Summary
LineStringExtracter(java.util.List comps)
          Constructs a filter with a list in which to store the elements found.
 
Method Summary
 void filter(Geometry geom)
          Performs an operation with or on geom.
static java.util.List getLines(Geometry geom)
          Extracts the LineString elements from a single Geometry and returns them in a List.
static java.util.List getLines(Geometry geom, java.util.List lines)
          Extracts the LineString elements from a single Geometry and adds them to the provided List.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LineStringExtracter

public LineStringExtracter(java.util.List comps)
Constructs a filter with a list in which to store the elements found.

Method Detail

getLines

public static java.util.List getLines(Geometry geom,
                                      java.util.List lines)
Extracts the LineString elements from a single Geometry and adds them to the provided List.

Parameters:
geom - the geometry from which to extract
lines - the list to add the extracted LineStrings to

getLines

public static java.util.List getLines(Geometry geom)
Extracts the LineString elements from a single Geometry and returns them in a List.

Parameters:
geom - the geometry from which to extract

filter

public void filter(Geometry geom)
Description copied from interface: GeometryFilter
Performs an operation with or on geom.

Specified by:
filter in interface GeometryFilter
Parameters:
geom - a Geometry to which the filter is applied.

JTS Topology Suite version 1.12