Class: QgsMeshDataBlock

class qgis.core.QgsMeshDataBlock

Bases: sip.wrapper

Constructs an invalid block

QgsMeshDataBlock(type: QgsMeshDataBlock.DataType, count: int) Constructs a new block

QgsMeshDataBlock(QgsMeshDataBlock)

QgsMeshDataBlock is a block of integers/doubles that can be used to retrieve: active flags (e.g. face’s active integer flag) scalars (e.g. scalar dataset double values) vectors (e.g. vector dataset doubles x,y values)

data are implicitly shared, so the class can be quickly copied std.numeric_limits<double>.quiet_NaN() represents NODATA value

Data can be accessed all at once with buffer() (faster) or value by value (slower) with active() or value()

New in version 3.6: Enums

Methods

active

Returns a value for active flag by the index For scalar and vector 2d the behavior is undefined

count

Number of items stored in the block

isValid

Whether the block is valid

type

Type of data stored in the block

value

Returns a value represented by the index For active flag the behavior is undefined

Signals

Attributes

ActiveFlagInteger

ScalarDouble

Vector2DDouble

ActiveFlagInteger = 0
class DataType

Bases: int

ScalarDouble = 1
Vector2DDouble = 2
active(self, index: int) → bool

Returns a value for active flag by the index For scalar and vector 2d the behavior is undefined

count(self) → int

Number of items stored in the block

isValid(self) → bool

Whether the block is valid

type(self) → QgsMeshDataBlock.DataType

Type of data stored in the block

value(self, index: int) → QgsMeshDatasetValue

Returns a value represented by the index For active flag the behavior is undefined