multiLineString abstract method

void multiLineString(
  1. Iterable<Iterable<double>> lineStrings, {
  2. required Coords type,
  3. String? name,
  4. Iterable<double>? bounds,
})

Writes a multi line string with an array of lineStrings (each with a chain of positions).

Use the required type to explicitely specify the type of coordinates.

Each line string or a chain of positions is represented by Iterable<double> instances. They contain coordinate values as a flat structure. For example for Coords.xyz the first three coordinate values are x, y and z of the first position, the next three coordinate values are x, y and z of the second position, and so on.

Use an optional name to specify a name for a geometry (when applicable).

An optional bounds can used set a minimum bounding box for a geometry written. A writer implementation may use it or ignore it. Supported coordinate value combinations by coordinate type:

Type Expected values
xy minX, minY, maxX, maxY
xyz minX, minY, minZ, maxX, maxY, maxZ
xym minX, minY, minM, maxX, maxY, maxM
xyzm minX, minY, minZ, minM, maxX, maxY, maxZ, maxM

An example to write a multi line string with two line strings:

 content.multiLineString(
     // an array of chains (one chain for each line string)
     [
       // a chain as a flat structure with four (x, y) points
       [
         10.1, 10.1,
         5.0, 9.0,
         12.0, 4.0,
         10.1, 10.1,
       ],
       // a chain as a flat structure with three (x, y) points
       [
         -1.1, -1.1,
         2.1, -2.5,
         3.5, -3.49,
       ],
     ],
     type: Coords.xy,
 );

Implementation

void multiLineString(
  Iterable<Iterable<double>> lineStrings, {
  required Coords type,
  String? name,
  Iterable<double>? bounds,
});