filter method
Performs an operation with or on geom
.
@param geom a Geometry
to which the filter is applied.
Implementation
void filter(Geometry geom) {
if (isForcedToLineString && geom is LinearRing) {
LineString line =
geom.getFactory().createLineStringSeq(geom.getCoordinateSequence());
lines.add(line);
return;
}
// if not being forced, and this is a linear component
if (geom is LineString) lines.add(geom);
// else this is not a linear component, so skip it
}