Class: QgsVertexId

Enums

VertexType

Types of vertex.

Methods

isValid

Returns True if the vertex id is valid

partEqual

Returns True if this vertex ID belongs to the same part as another vertex ID.

ringEqual

Returns True if this vertex ID belongs to the same ring as another vertex ID (i.e. the part and ring number are equal).

vertexEqual

Returns True if this vertex ID corresponds to the same vertex as another vertex ID (i.e. the part, ring number and vertex number are equal).

Attributes

part

Part number

ring

Ring number

type

Vertex type

vertex

Vertex number

class qgis.core.QgsVertexId

Bases: object

class VertexType(*values)

Bases: IntEnum

Types of vertex.

Added in version 3.22.

  • Segment: The actual start or end point of a segment

    Available as QgsVertexId.SegmentVertex in older QGIS releases.

  • Curve: An intermediate point on a segment defining the curvature of the segment

    Available as QgsVertexId.CurveVertex in older QGIS releases.

isValid(self) bool[source]

Returns True if the vertex id is valid

Return type:

bool

isValid(self, geom: QgsAbstractGeometry | None) bool[source]

Returns True if this vertex ID is valid for the specified geom.

Parameters:

geom (Optional[QgsAbstractGeometry])

Return type:

bool

part: int

Part number

partEqual(self, o: QgsVertexId) bool[source]

Returns True if this vertex ID belongs to the same part as another vertex ID.

Parameters:

o (QgsVertexId)

Return type:

bool

ring: int

Ring number

ringEqual(self, o: QgsVertexId) bool[source]

Returns True if this vertex ID belongs to the same ring as another vertex ID (i.e. the part and ring number are equal).

Parameters:

o (QgsVertexId)

Return type:

bool

type: VertexType

Vertex type

vertex: int

Vertex number

vertexEqual(self, o: QgsVertexId) bool[source]

Returns True if this vertex ID corresponds to the same vertex as another vertex ID (i.e. the part, ring number and vertex number are equal).

Parameters:

o (QgsVertexId)

Return type:

bool