Class: QgsVertexId¶
- class qgis.core.QgsVertexId(_part: int = -1, _ring: int = -1, _vertex: int = -1, _type: Qgis.VertexType = Qgis.VertexType.Segment)¶
Bases:
sip.wrapper
Constructor for
QgsVertexId
.QgsVertexId(
QgsVertexId
)Enums
Bases:
enum.IntEnum
Methods
Returns
True
if the vertex id is validReturns
True
if this vertex ID belongs to the same part as another vertex ID.Returns
True
if this vertex ID belongs to the same ring as another vertex ID (i.e. the part and ring number are equal).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
- class VertexType(value)¶
Bases:
enum.IntEnum
Types of vertex.
New in version 3.22.
SegmentVertex
: The actual start or end point of a segmentCurveVertex
: An intermediate point on a segment defining the curvature of the segment
- isValid(self) bool ¶
Returns
True
if the vertex id is validisValid(self, geom:
QgsAbstractGeometry
) -> bool ReturnsTrue
if this vertex ID is valid for the specifiedgeom
.- Return type:
bool
- part¶
- partEqual(self, o: QgsVertexId) bool ¶
Returns
True
if this vertex ID belongs to the same part as another vertex ID.- Parameters:
o (QgsVertexId) –
- Return type:
bool
- ring¶
- ringEqual(self, o: QgsVertexId) bool ¶
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¶
- vertex¶
- vertexEqual(self, o: QgsVertexId) bool ¶
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