QgsLineString(points: Iterable[QgsPoint])
Construct a linestring from a vector of points.
Z and M type will be set based on the type of the first point
in the vector.

New in version 3.0.

QgsLineString(x: Iterable[float], y: Iterable[float], z: Iterable[float] = [], m: Iterable[float] = [], is25DType: bool = False)
Construct a linestring from arrays of coordinates. If the z or m
arrays are non-empty then the resultant linestring will have
z and m types accordingly.
This constructor is more efficient then calling setPoints()
or repeatedly calling addVertex()

If the z vector is filled, then the geometry type will either
be a LineStringZ(M) or LineString25D depending on the is25DType
argument. If is25DType is True (and the m vector is unfilled) then
the created Linestring will be a LineString25D type. Otherwise, the
LineString will be LineStringZ (or LineStringZM) type.

New in version 3.0.

QgsLineString(p1: QgsPoint, p2: QgsPoint)
Constructs a linestring with a single segment from p1 to p2.

New in version 3.2.

QgsLineString(points: Iterable[QgsPointXY])
Construct a linestring from list of points.
This constructor is more efficient then calling setPoints()
or repeatedly calling addVertex()

New in version 3.0.

QgsLineString(segment: QgsLineSegment2D)
Construct a linestring from a single 2d line segment.