Class: QgsVertexId

class qgis.core.QgsVertexId[source]

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

isValid(self, geom: Optional[QgsAbstractGeometry]) -> bool Returns True if this vertex ID is valid for the specified geom.

Return type:

bool

part: int
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
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: int
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