Class: QgsTriangulatedSurface

Triangulated surface geometry type.

A TIN (triangulated irregular network) is a PolyhedralSurface consisting only of triangle patches.

Added in version 3.40.

List of all members, including inherited members

Class Hierarchy

Inheritance diagram of qgis.core.QgsTriangulatedSurface

Base classes

QgsPolyhedralSurface

Polyhedral surface geometry type.

QgsSurface

Surface geometry type.

QgsAbstractGeometry

Abstract base class for all geometries.

Abstract Methods

clone

createEmptyWithSameType

snappedToGrid

Methods

addTriangle

Adds a triangle to the geometry, transferring ownership to the polyhedral surface.

setTriangles

Sets all triangles, transferring ownership to the polyhedral surface.

triangleN

Returns the triangle with the specified index.

class qgis.core.QgsTriangulatedSurface[source]

Bases: QgsPolyhedralSurface

addTriangle(self, triangle: QgsTriangle | None)[source]

Adds a triangle to the geometry, transferring ownership to the polyhedral surface.

Parameters:

triangle (QgsTriangle|None)

abstract clone(self) → QgsTriangulatedSurface | None[source]
Return type:

QgsTriangulatedSurface|None

abstract createEmptyWithSameType(self) → QgsTriangulatedSurface | None[source]
Return type:

QgsTriangulatedSurface|None

setTriangles(self, triangles: Iterable[QgsTriangle])[source]

Sets all triangles, transferring ownership to the polyhedral surface.

Parameters:

triangles (Iterable[QgsTriangle])

abstract snappedToGrid(self, hSpacing: float, vSpacing: float, dSpacing: float = 0, mSpacing: float = 0, removeRedundantPoints: bool = False) → QgsTriangulatedSurface | None[source]
Parameters:
  • hSpacing (float)

  • vSpacing (float)

  • dSpacing (float = 0)

  • mSpacing (float = 0)

  • removeRedundantPoints (bool = False)

Return type:

QgsTriangulatedSurface|None

triangleN(self, index: int) → QgsPolygon[source]

Returns the triangle with the specified index.

Raises:

IndexError – if no polygon with the specified index exists.

Parameters:

index (int)

Return type:

QgsPolygon