toWKT method

String toWKT()

Converts the FeatureCollection to a WKT string.

Example:

FeatureCollection([
  Point(Coordinate(1, 2)),
  Point(Coordinate(3, 4))
]).toWKT(); // GEOMETRYCOLLECTION(POINT(1 2), POINT(3 4))

Implementation

String toWKT() {
  return 'GEOMETRYCOLLECTION(${features.map((f) => f.toWKT()).join(',')})';
}