Class: QgsCircularString

class qgis.core.QgsCircularString

Bases: qgis._core.QgsCurve

Constructs an empty circular string.

QgsCircularString(p1: QgsPoint, p2: QgsPoint, p3: QgsPoint) Constructs a circular string with a single arc passing through p1, p2 and p3.

New in version 3.2.

QgsCircularString(QgsCircularString)

Circular string geometry type

New in version 2.10: Enums

Methods

addMValue

addToPainterPath

addZValue

asGml2

asGml3

asWkb

asWkt

calculateBoundingBox

childCount

childGeometry

childPoint

clear

clearCache

clone

closestSegment

createEmptyWithSameType

curveSubstring

curveToLine

deleteVertex

dimension

draw

drawAsPolygon

dropMValue

dropZValue

endPoint

equals

fromTwoPointsAndCenter

Creates a circular string with a single arc representing the curve from p1 to p2 with the specified center.

fromWkb

fromWkt

geometryType

hasChildGeometries

hasCurvedSegments

insertVertex

interpolatePoint

isEmpty

length

moveVertex

numPoints

pointAt

pointN

Returns the point at index i within the circular string.

points

removeDuplicateNodes

reversed

segmentLength

setPoints

Sets the circular string’s points

setZMTypeFromSubGeometry

snappedToGrid

startPoint

sumUpArea

swapXy

transform

transform(self, t: QTransform, zTranslate: float = 0, zScale: float = 1, mTranslate: float = 0, mScale: float = 1)

vertexAngle

xAt

yAt

Signals

Attributes

addMValue(self, mValue: float = 0) → bool
addToPainterPath(self, path: QPainterPath)
addZValue(self, zValue: float = 0) → bool
asGml2(self, doc: QDomDocument, precision: int = 17, ns: str = '', axisOrder: QgsAbstractGeometry.AxisOrder = QgsAbstractGeometry.AxisOrder.XY) → QDomElement
asGml3(self, doc: QDomDocument, precision: int = 17, ns: str = '', axisOrder: QgsAbstractGeometry.AxisOrder = QgsAbstractGeometry.AxisOrder.XY) → QDomElement
asWkb(self) → QByteArray
asWkt(self, precision: int = 17) → str
calculateBoundingBox(self) → QgsRectangle
childCount()
childGeometry()
childPoint()
clear(self)
clearCache()
clone(self) → QgsCircularString
closestSegment(self, pt: QgsPoint, epsilon: float = 4*DBL_EPSILON) → Tuple[float, QgsPoint, QgsVertexId, int]
createEmptyWithSameType(self) → QgsCircularString
curveSubstring(self, startDistance: float, endDistance: float) → QgsCircularString
curveToLine(self, tolerance: float = M_PI_2/90, toleranceType: QgsAbstractGeometry.SegmentationToleranceType = QgsAbstractGeometry.MaximumAngle) → QgsLineString
deleteVertex(self, position: QgsVertexId) → bool
dimension(self) → int
draw(self, p: QPainter)
drawAsPolygon(self, p: QPainter)
dropMValue(self) → bool
dropZValue(self) → bool
endPoint(self) → QgsPoint
equals(self, other: QgsCurve) → 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 to p2 with the specified center.

If useShortestArc is True, then the arc returned will be that corresponding to the shorter arc from p1 to p2. If it is False, the longer arc from p1 to p2 will be used (i.e. winding the other way around the circle).

New in version 3.2.

fromWkb(self, wkb: QgsConstWkbPtr) → bool
fromWkt(self, wkt: str) → bool
geometryType(self) → str
hasChildGeometries()
hasCurvedSegments(self) → bool
insertVertex(self, position: QgsVertexId, vertex: QgsPoint) → bool
interpolatePoint(self, distance: float) → QgsPoint
isEmpty(self) → bool
length(self) → float
moveVertex(self, position: QgsVertexId, newPos: QgsPoint) → bool
numPoints(self) → int
pointAt(self, node: int, point: QgsPoint) → Tuple[bool, QgsVertexId.VertexType]
pointN(self, i: int) → QgsPoint

Returns the point at index i within the circular string.

points(self) → List[QgsPoint]
removeDuplicateNodes(self, epsilon: float = 4*DBL_EPSILON, useZValues: bool = False) → bool
reversed(self) → QgsCircularString
segmentLength(self, startVertex: QgsVertexId) → float
setPoints(self, points: Iterable[QgsPoint])

Sets the circular string’s points

setZMTypeFromSubGeometry()
snappedToGrid(self, hSpacing: float, vSpacing: float, dSpacing: float = 0, mSpacing: float = 0) → QgsCircularString
startPoint(self) → QgsPoint
sumUpArea(self) → 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)

vertexAngle(self, vertex: QgsVertexId) → float
xAt(self, index: int) → float
yAt(self, index: int) → float