Class: QgsCircularString¶
-
class
qgis.core.
QgsCircularString
¶ Bases:
QgsCurve
Constructs an empty circular string.
QgsCircularString(p1:
QgsPoint
, p2:QgsPoint
, p3:QgsPoint
) Constructs a circular string with a single arc passing throughp1
,p2
andp3
.New in version 3.2.
QgsCircularString(
QgsCircularString
)Circular string geometry type
Methods
- param mValue
- param path
- param zValue
- param doc
- param doc
- param precision
- rtype
QByteArray
- param precision
- rtype
QgsRectangle
- rtype
QgsCircularString
- param pt
- rtype
QgsCircularString
- param startDistance
- param tolerance
- param position
- rtype
int
- param p
- param p
- rtype
bool
- rtype
bool
- rtype
QgsPoint
- param other
Creates a circular string with a single arc representing the curve from
p1
top2
with the specifiedcenter
.- param wkb
- param wkt
- rtype
str
- rtype
bool
- param position
- param distance
- rtype
bool
- rtype
float
- param position
- rtype
int
- param node
Returns the point at index i within the circular string.
- rtype
object
- param epsilon
- rtype
QgsCircularString
- param startVertex
Sets the circular string’s points
- param hSpacing
- rtype
QgsPoint
- rtype
float
transform(self, t: QTransform, zTranslate: float = 0, zScale: float = 1, mTranslate: float = 0, mScale: float = 1)
- param vertex
- param index
- param index
-
addMValue
(self, mValue: float = 0) → bool¶ - Parameters
mValue (float = 0) –
- Return type
bool
-
addToPainterPath
(self, path: QPainterPath)¶ - Parameters
path (QPainterPath) –
-
addZValue
(self, zValue: float = 0) → bool¶ - Parameters
zValue (float = 0) –
- Return type
bool
-
asGml2
(self, doc: QDomDocument, precision: int = 17, ns: str = '', axisOrder: QgsAbstractGeometry.AxisOrder = QgsAbstractGeometry.AxisOrder.XY) → QDomElement¶ - Parameters
doc (QDomDocument) –
precision (int = 17) –
ns (str = '') –
axisOrder (QgsAbstractGeometry.AxisOrder = QgsAbstractGeometry.AxisOrder.XY) –
- Return type
QDomElement
-
asGml3
(self, doc: QDomDocument, precision: int = 17, ns: str = '', axisOrder: QgsAbstractGeometry.AxisOrder = QgsAbstractGeometry.AxisOrder.XY) → QDomElement¶ - Parameters
doc (QDomDocument) –
precision (int = 17) –
ns (str = '') –
axisOrder (QgsAbstractGeometry.AxisOrder = QgsAbstractGeometry.AxisOrder.XY) –
- Return type
QDomElement
-
asJson
(self, precision: int = 17) → str¶ - Parameters
precision (int = 17) –
- Return type
str
-
asWkb
(self) → QByteArray¶ - Return type
QByteArray
-
asWkt
(self, precision: int = 17) → str¶ - Parameters
precision (int = 17) –
- Return type
str
-
calculateBoundingBox
(self) → QgsRectangle¶ - Return type
-
childCount
()¶
-
childGeometry
()¶
-
childPoint
()¶
-
clear
(self)¶
-
clearCache
()¶
-
clone
(self) → QgsCircularString¶ - Return type
-
closestSegment
(self, pt: QgsPoint, epsilon: float = 4*DBL_EPSILON) → Tuple[float, QgsPoint, QgsVertexId, int]¶ - Parameters
pt (QgsPoint) –
epsilon (float = 4*DBL_EPSILON) –
- Return type
Tuple[float,
QgsPoint
,QgsVertexId
, int]
-
createEmptyWithSameType
(self) → QgsCircularString¶ - Return type
-
curveSubstring
(self, startDistance: float, endDistance: float) → QgsCircularString¶ - Parameters
startDistance (float) –
endDistance (float) –
- Return type
-
curveToLine
(self, tolerance: float = M_PI_2/90, toleranceType: QgsAbstractGeometry.SegmentationToleranceType = QgsAbstractGeometry.MaximumAngle) → QgsLineString¶ - Parameters
tolerance (float = M_PI_2/90) –
toleranceType (QgsAbstractGeometry.SegmentationToleranceType = QgsAbstractGeometry.MaximumAngle) –
- Return type
-
deleteVertex
(self, position: QgsVertexId) → bool¶ - Parameters
position (QgsVertexId) –
- Return type
bool
-
dimension
(self) → int¶ - Return type
int
-
draw
(self, p: QPainter)¶ - Parameters
p (QPainter) –
-
drawAsPolygon
(self, p: QPainter)¶ - Parameters
p (QPainter) –
-
dropMValue
(self) → bool¶ - Return type
bool
-
dropZValue
(self) → bool¶ - Return type
bool
-
fromTwoPointsAndCenter
(p1: QgsPoint, p2: QgsPoint, center: QgsPoint, useShortestArc: bool = True) → QgsCircularString¶ Creates a circular string with a single arc representing the curve from
p1
top2
with the specifiedcenter
.If
useShortestArc
is true, then the arc returned will be that corresponding to the shorter arc fromp1
top2
. If it is false, the longer arc fromp1
top2
will be used (i.e. winding the other way around the circle).New in version 3.2.
- Parameters
- Return type
-
fromWkb
(self, wkb: QgsConstWkbPtr) → bool¶ - Parameters
wkb (QgsConstWkbPtr) –
- Return type
bool
-
fromWkt
(self, wkt: str) → bool¶ - Parameters
wkt (str) –
- Return type
bool
-
geometryType
(self) → str¶ - Return type
str
-
hasChildGeometries
()¶
-
hasCurvedSegments
(self) → bool¶ - Return type
bool
-
insertVertex
(self, position: QgsVertexId, vertex: QgsPoint) → bool¶ - Parameters
position (QgsVertexId) –
vertex (QgsPoint) –
- Return type
bool
-
interpolatePoint
(self, distance: float) → QgsPoint¶ - Parameters
distance (float) –
- Return type
-
isEmpty
(self) → bool¶ - Return type
bool
-
length
(self) → float¶ - Return type
float
-
moveVertex
(self, position: QgsVertexId, newPos: QgsPoint) → bool¶ - Parameters
position (QgsVertexId) –
newPos (QgsPoint) –
- Return type
bool
-
numPoints
(self) → int¶ - Return type
int
-
pointAt
(self, node: int, point: QgsPoint) → Tuple[bool, QgsVertexId.VertexType]¶ - Parameters
node (int) –
point (QgsPoint) –
- Return type
Tuple[bool, QgsVertexId.VertexType]
-
pointN
(self, i: int) → QgsPoint¶ Returns the point at index i within the circular string.
- Parameters
i (int) –
- Return type
-
points
(self) → object¶ - Return type
object
-
removeDuplicateNodes
(self, epsilon: float = 4*DBL_EPSILON, useZValues: bool = False) → bool¶ - Parameters
epsilon (float = 4*DBL_EPSILON) –
useZValues (bool = False) –
- Return type
bool
-
reversed
(self) → QgsCircularString¶ - Return type
-
segmentLength
(self, startVertex: QgsVertexId) → float¶ - Parameters
startVertex (QgsVertexId) –
- Return type
float
-
setPoints
(self, points: object)¶ Sets the circular string’s points
- Parameters
points (object) –
-
setZMTypeFromSubGeometry
()¶
-
snappedToGrid
(self, hSpacing: float, vSpacing: float, dSpacing: float = 0, mSpacing: float = 0) → QgsCircularString¶ - Parameters
hSpacing (float) –
vSpacing (float) –
dSpacing (float = 0) –
mSpacing (float = 0) –
- Return type
-
sumUpArea
(self) → float¶ - Return type
float
-
swapXy
(self)¶
-
transform
(self, ct: QgsCoordinateTransform, d: QgsCoordinateTransform.TransformDirection = QgsCoordinateTransform.ForwardTransform, transformZ: bool = False)¶ transform(self, t: QTransform, zTranslate: float = 0, zScale: float = 1, mTranslate: float = 0, mScale: float = 1)
- Parameters
ct (QgsCoordinateTransform) –
d (QgsCoordinateTransform.TransformDirection = QgsCoordinateTransform.ForwardTransform) –
transformZ (bool = False) –
-
vertexAngle
(self, vertex: QgsVertexId) → float¶ - Parameters
vertex (QgsVertexId) –
- Return type
float
-
xAt
(self, index: int) → float¶ - Parameters
index (int) –
- Return type
float
-
yAt
(self, index: int) → float¶ - Parameters
index (int) –
- Return type
float