lineString abstract method
void
lineString(})
Writes a line string geometry with a chain
of positions.
Use the required type
to explicitely specify the type of coordinates.
The chain
array contains coordinate values of chain positions 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 line string with 3 points and a bounding box:
content.lineString(
// points as a flat structure with three (x, y) points
[
-1.1, -1.1,
2.1, -2.5,
3.5, -3.49,
],
type: Coords.xy,
bounds: [-1.1, -3.49, 3.5, -1.1],
);
Implementation
void lineString(
Iterable<double> chain, {
required Coords type,
String? name,
Iterable<double>? bounds,
});