Class: QgsCompoundCurve

class qgis.core.QgsCompoundCurve

Bases: qgis._core.QgsCurve

Compound curve geometry type

New in version 2.10: Enums

Methods

addCurve

Adds a curve to the geometry (takes ownership)

addMValue

addToPainterPath

addVertex

Adds a vertex to the end of the geometry.

addZValue

asGml2

asGml3

asWkb

asWkt

calculateBoundingBox

childCount

childGeometry

childPoint

clear

clearCache

clone

close

Appends first point if not already closed.

closestSegment

createEmptyWithSameType

curveAt

Returns the curve at the specified index.

curveSubstring

curveToLine

Returns a new line string geometry corresponding to a segmentized approximation of the curve.

deleteVertex

dimension

draw

drawAsPolygon

dropMValue

dropZValue

endPoint

equals

fromWkb

fromWkt

geometryType

hasChildGeometries

hasCurvedSegments

insertVertex

interpolatePoint

isEmpty

length

moveVertex

nCurves

Returns the number of curves in the geometry.

numPoints

pointAt

points

removeCurve

Removes a curve from the geometry.

removeDuplicateNodes

reversed

segmentLength

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

addCurve(self, c: QgsCurve)

Adds a curve to the geometry (takes ownership)

addMValue(self, mValue: float = 0) → bool
addToPainterPath(self, path: QPainterPath)
addVertex(self, pt: QgsPoint)

Adds a vertex to the end of the geometry.

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) → QgsCompoundCurve
close(self)

Appends first point if not already closed.

closestSegment(self, pt: QgsPoint, epsilon: float = 4*DBL_EPSILON) → Tuple[float, QgsPoint, QgsVertexId, int]
createEmptyWithSameType(self) → QgsCompoundCurve
curveAt(self, i: int) → QgsCurve

Returns the curve at the specified index.

curveSubstring(self, startDistance: float, endDistance: float) → QgsCompoundCurve
curveToLine(self, tolerance: float = M_PI_2/90, toleranceType: QgsAbstractGeometry.SegmentationToleranceType = QgsAbstractGeometry.MaximumAngle) → QgsLineString

Returns a new line string geometry corresponding to a segmentized approximation of the curve.

Parameters
  • tolerance – segmentation tolerance

  • toleranceType – maximum segmentation angle or maximum difference between approximation and curve*

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
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
nCurves(self) → int

Returns the number of curves in the geometry.

numPoints(self) → int
pointAt(self, node: int, point: QgsPoint) → Tuple[bool, QgsVertexId.VertexType]
points(self) → object
removeCurve(self, i: int)

Removes a curve from the geometry.

Parameters

i – index of curve to remove

removeDuplicateNodes(self, epsilon: float = 4*DBL_EPSILON, useZValues: bool = False) → bool
reversed(self) → QgsCompoundCurve
segmentLength(self, startVertex: QgsVertexId) → float
setZMTypeFromSubGeometry()
snappedToGrid(self, hSpacing: float, vSpacing: float, dSpacing: float = 0, mSpacing: float = 0) → QgsCompoundCurve
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