getLinesGF static method

List<Geometry> getLinesGF(
  1. Geometry geom,
  2. bool forceToLineString
)

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 {@link LinearComponentExtracter} instance and pass it to multiple geometries.

@param geom the geometry from which to extract linear components @param forceToLineString true if LinearRings should be converted to LineStrings @return the list of linear components

Implementation

static List<Geometry> getLinesGF(Geometry geom, bool forceToLineString) {
  List<LineString> lines = [];
  geom.applyGCF(
      new LinearComponentExtracter.withForced(lines, forceToLineString));
  return lines;
}