com.vividsolutions.jts.geom.util

Class LinearComponentExtracter

Implemented Interfaces:
GeometryComponentFilter

public class LinearComponentExtracter
extends java.lang.Object
implements GeometryComponentFilter

Extracts all the 1-dimensional (LineString) components from a Geometry.
Version:
1.7

Constructor Summary

LinearComponentExtracter(List lines)
Constructs a LineExtracterFilter with a list in which to store LineStrings found.

Method Summary

void
filter(Geometry geom)
static List
getLines(Geometry geom)
Extracts the linear components from a single geometry.

Constructor Details

LinearComponentExtracter

public LinearComponentExtracter(List lines)
Constructs a LineExtracterFilter with a list in which to store LineStrings found.

Method Details

filter

public void filter(Geometry geom)
Specified by:
filter in interface GeometryComponentFilter

getLines

public static List getLines(Geometry geom)
Extracts the linear components from a single geometry. If more than one geometry is to be processed, it is more efficient to create a single LineExtracterFilter instance and pass it to multiple geometries.
Parameters:
geom - the geometry from which to extract linear components
Returns:
the list of linear components