toWKT method

  1. @override
String toWKT()
override

Converts the LineString to a String in WKT format.

Example:

LineString([Coordinate(1, 2), Coordinate(3, 4)]).toWKT(); // LINESTRING(1 2, 3 4)

Implementation

@override
String toWKT() {
  return 'LINESTRING(${coordinates.map((c) => c.toWKT()).join(',')})';
}