Class: QgsCircularString¶
Circular string geometry type.
Class Hierarchy¶
Base classes¶
Abstract base class for curved geometry type. |
|
Abstract base class for all geometries. |
Methods
Appends the contents of another circular string to the end of this circular string. |
|
Returns the point at index i within the circular string. |
|
Sets the circular string's points |
Static Methods
Creates a circular string with a single arc representing the curve from p1 to p2 with the specified center. |
- class qgis.core.QgsCircularString[source]¶
Bases:
QgsCurve
- __init__()
Constructs an empty circular string.
- __init__(p1: QgsPoint, p2: QgsPoint, p3: QgsPoint)
Constructs a circular string with a single arc passing through
p1
,p2
andp3
.Added in version 3.2.
- __init__(x: Iterable[float], y: Iterable[float], z: Iterable[float] = [], m: Iterable[float] = [])
Construct a circular string from arrays of coordinates. If the z or m arrays are non-empty then the resultant circular string will have z and m types accordingly.
This constructor is more efficient then calling
setPoints()
.If the sizes of
x
andy
are non-equal then the resultant circular string will be created using the minimum size of these arrays.Warning
It is the caller’s responsibility to ensure that the supplied arrays are of odd sizes.
Added in version 3.20.
- Parameters:
x (Iterable[float])
y (Iterable[float])
z (Iterable[float] = [])
m (Iterable[float] = [])
- __init__(a0: QgsCircularString)
- Parameters:
a0 (QgsCircularString)
- append(self, string: QgsCircularString | None)[source]¶
Appends the contents of another circular
string
to the end of this circular string.- Parameters:
string (Optional[QgsCircularString]) – circular string to append. Ownership is not transferred.
Warning
It is the caller’s responsibility to ensure that the first point in the appended
string
matches the last point in the existing curve, or the result will be undefined.Added in version 3.20.
- static fromTwoPointsAndCenter(p1: QgsPoint, p2: QgsPoint, center: QgsPoint, useShortestArc: bool = True) QgsCircularString [source]¶
Creates a circular string with a single arc representing the curve from
p1
top2
with the specifiedcenter
.If
useShortestArc
isTrue
, then the arc returned will be that corresponding to the shorter arc fromp1
top2
. If it isFalse
, the longer arc fromp1
top2
will be used (i.e. winding the other way around the circle).Added in version 3.2.
- Parameters:
- Return type: